home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 43
/
Aminet 43 (2001)(GTI - Schatztruhe)[!][Jun 2001].iso
/
Aminet
/
game
/
board
/
ChaosLite.lha
/
Chaos
/
History.txt
< prev
next >
Wrap
Text File
|
2001-02-23
|
730KB
|
16,270 lines
Massive Changes made by James Conwell.
Begin Version 1.6 Jan. 6th 1997
*Enhanced Pronuciation of Speech.
*Made numerous enhancements to program documentation.
*Made numerous enhancements to the User Manual.
My dad told me that he was playing a game of Chaos 1.5 and he had a magic
bow with Range Boost. Everything was great. He then got _another_ magic
bow so he thought "Oh cool! Now I can be even more powerful!" He cast
magic bow and it removed his Range Boost! He was not happy.
One thing that has always annoyed me is not knowing if I have line of sight
diagonally adjacent to a generator or wall. I hate it when I try to cast a
creature into a blank spot by a generator and then it says I can't because
I don't have line of sight! Sometimes it works, sometimes it doesn't. It
all depends on the quadrant.
I have decided to alleviate this and add a new capability at the same time.
Spells now have a CAST_LOS bit.
Here is a complete list of things that I have changed in the cast.tex so
far:
*1. Added a new bit to CastInfo[] called CAST_LOS. This bit determines if
a spell needs Line Of Sight or not. This solves the problem of casting
creatures diagonally next to a generator or other large square object.
It also allows the creation of spells that, for instance, have a range
3 but DON'T require line of sight. Cool!
*2. I have modified the spell bits appropriately. Now all spells have thier
CAST_LOS bit set except for spells with range of 0,1 or 15. So everything
is functionally the same as it was.
*3. CastInfo[] is now an array of UWORDS instead of UBYTES.
*4. Made 1 change to DoCast and 2 changes to DoComputerCast to make the
new CAST_LOS bit take effect.
*5. Vengeance and Exorcise used to do the {\it exact} same thing.
So I was going to change Exorcise to only be able to be cast on Undeads
and bump the strength up to 7 to make up for this but there is no
CAST_UNDEAD or CAST_UNDEAD_ONLY bit so I just raised the strength of
Exorcise to 4.
I just don't see the point in having 2 spells which do the exact same
thing.
Dark Power and Justice used to do the exact same thing. Now I have
changed Justice to be 2 sets of 3-point attacks instead of 3 sets of
2-point attacks to add some variety.
Thus Justice is now a bit less useful but Exorcise is a bit more useful
so hopefully the play-balance is roughly the same as it was.
*6. Magic Bow is now cumulative. Since magic bows are so rare (I've never
had 2 of them in Chaos 1.5), I have set it to bump up the range by 1 on
additional bows. That should be a pleasant surprise to anyone if they
ever have 2 of them!
*7. Destroy Wall now destroys PowerWalls also.
*8. Made some adjustments to the TeX stuff.
*9. Show numbers beside bar graphs.
More Chaos User Manual Changes:
*I made lots of little corrections.
Then I did some embellishments:
*1. I completely rewrote the intro. Hope you don't mind.
Sorry it took so long but I just kept rereading it and editing it and
rereading it and editing it... at least 30 times...
*2. I embellished the description of the Roper, the combat section and the
impurities.
Subject: Freaky bug detected!
I read over prog.tex thinking I was just going to word correct and spell
correct the tex docs. This I did. They are now much better.
Then I noticed something...
#define GAMEROWNTSC 14 /* number of rows in a NTSC game */
#define GAMEROWPAL 11 /* the number of rows in a PAL game */
These 2 numbers are switched around!
PAL is higher resolution than NTSC, thus it has more rows.
PAL lores = 320x256. NTSC lores = 320x200.
I couldn't believe that the game could even work with these 2 numbers switched
around so I did some more research and found out why it was working...
Another bug!
Look at this from cmove.tex
int weights[GAMEROWNTSC * GAMECOL];
See, it is using what is supposed to be the small value which would be too
small for PAL users which would mean you would be using out-of-bounds
subscripts in PAL mode BUT since you are the luckiest programmer I've ever
seen, these 2 bugs cancelled each other out! Unbelievable! When *I* have
2 bugs in a program they produce 4 errors, not 0.
I fixed the stuff in prog.tex and cmove.tex
Also in cmove.tex:
I fixed the deal where Independent Undeads never bothered to shoot.
Word corrected some tex notes.
I noticed something else that looks highly suspicious in prog.tex:
#define NTSCMode (GfxBase->DisplayFlags & PAL)
Shouldn't this be NTSC ?
Yes.
I will soon be adding a bunch of new stuff to the game and I don't want to
be accused of being a memory hog so I have made 2 changes in prog.tex to
save about 3k of ram. I changed
const char creature_name[][CREATURE_SIZE] = {
to
const char *creature_name[] = {
to produce a ragged array instead of a memory wasting rectangular array.
Ditto for creature_speech.
This has saved several k of ram!
This also allowed me to delete the #define CREATURE_SIZE and SPEECH_SIZE
since no part of the program ever uses either one.
move.tex
On a completely seperate subject, I made a small change to move.tex to
allow me to see the _actual_ movement points available. Sometimes if you
have 2 movement points, you can move diagaonally and then straight. Other
times you can move diagonally once and then your move is over. I am hoping
that I can understand the movement system better with the real movement
points showing. I already understand it better now that I know that you
are given a free .5 points at the beginning of the turn. That helps a lot,
but I still don't get some things.
*Added some prototypes to eliminate warnings with SASC6.0
*Show LOS required on Spell Info screen.
Regarding using bitfields vs. NOT using bitfields:
Well, here is everything I know about the subject:
accessing board[i].char_stat.Life as a field of 5 bits vs. as a byte.
I will ignore the C overhead since I don't know precisely what that is.
At some point a move instruction will be generated to get the value then
an and instruction will have to done to mask the appropriate bits. Given
the notorious inefficiency of C, probably wastes an instruction fetching
the mask, but who knows.
bitfield method:
move.b source, d0
move.b mask,d1
and.b d1,d0
lsr.b #x,d0
Byte method:
move.b source,d0
So here we have 4 instructions to fetch the value vs. 1 instruction. Even
if C is perfectly efficient, it WILL take at least twice as many instructions
to fetch a bitfield as opposed to a byte.
As for board[i].char_stat.Life vs. board[i].Life I would guess that the
shorter version is quicker but the compiler could be clever enough that it
wouldn't matter. I am assuming that both are bytes or both are bitfields.
The reason bitfields are inherently slow is that all processors that I have
ever studied are all designed to handle data in bytes, and/or words and/or
longwords. Most processors have no bitfield instructions. Most of the
processors that do have bitfield instructions (such 68020 to 68060) the
bitfield instructions are much slower than a simple byte instruction (about
4x slower) It is often faster to avoid the bitfield instruction and just
use a byte instruction and an and/or instruction.
If you are really worried about speed then there is one simple thing you
can do in the future to speed things up. Avoid >> and <<. Shifting a
variable takes an extra instruction. So shifting and storing takes twice
as long as just storing.
However, it is even worse on the 68000. On the 68000 a shift of 1 takes as
long as a regular instruction but it takes another 2 cycles for each
additional shift. So when you shift by 3 ( << 3 ) you are adding around
the equivalent of 2 simple instructions to the overall execution time in
assembly code. Quite possibly more in C.
The 68020 and higher processors have a "barrell shifter" which means they
can shift any number of bits left or right in the same amount of time as a
shift of 1.
The only time I've really noticed chaos being slow is during computer
movement on my Dad's 7.15909 Mhz A500. I noticed a lot of math being done
in cmove.tex so that probably explains it. Multiplies take about 70 cycles
and divides take about 158 cycles on the 68000. That's like 20 regular
instructions.
It basically seems ok to me on my A3000 and back when I used to play it on
the A4000 it flew.
Oh yes, I forgot one thing:
Every time you access a bitfield it _must_ take at least TWO extra
instructions to do that. Each instruction is 2 bytes. So if you have lots
of code that accesses bitpacked fields then much or even all or even worse
than all the space saved is wasted again.
So right now every time we access char_stat.Life, there are 2 extra
instructions being generated (at least). So if we access char_stat.Life 100
times in the program then that wastes 400 bytes and we only saved 3 bits
per item in creature info. So if we have 200 objects (there aren't that
many yet but there will be one day) then we saved 200*3 bits = 600 bits =
about 75 bytes. A net defecit of 325 bytes.
And it takes significantly more time; executing 3 instructions instead of
1.
Chaos is currently 190284 bytes in size.
To prove that I know what I am talking about, I will now change
CreatureInfo to use all BYTES and then do a complete recompile.
<Time Passes>
...
<More Time Passes>
Ok the complete recompile is done.
Chaos is now only 187452 bytes in size! Cool, I just saved you another
2,832 bytes. Maximum code size was reduced by about the same amount.
The game is now faster too. Our fathers should appreciate that. 8)
This is good because I'm fixing to add in about 5k of new
variables to the program. Heehee.
James "The Optimizer" Strikes Again!
SAI changes: =========================
*20 new spells!!!.
*CAST_UNDEAD_FLAG
*Other stuff.
*Fixed a bug that sometimes causes a crash. (obtain/release semaphore)
*Added some prototypes to eliminate warnings with SASC6.0
======================================
More JJC Changes
Begin Version 1.7 Feb 16th, 1997.
*Resurrect and RessurrectID -> MassResurrect
*Cloaked creatures now block enemy's LOS but not friendly's LOS.
*No need to specially program things that don't block LOS (like Pool and
Fire). The Chaos Engine now takes care of that for you when you set the
Blocks_LOS entry in CreatureInfo appropriately.
*Added new function SameTeam to predicate.tex to assist with new LOS code.
*Pick your bonus spells. I'll do the GUI later.
*Fixed life 0. Creatures didn't die when they reached 0 life. Now they do.
*Fixed Load last name from savefile.
*Added lots of new stats in and set them appropriately for each creature.
*Movement points as float rather than integer.
*Personalities (I put in the new stats in CreatureInfo but cmove.tex still
must be changed.
*Modified end-of-turn healing to heal all appropriate stats.
*Modified existing combat routine to take into account negative combat.
We can now make creatures whose attacks heal instead of hurt.
*Modified existing combat routine to take into account affecting
different/multiple stats other than life.
Now we can make creatures that attack any stat or combination of stats.
Such as intelligence or magic resistance etc.
*Added 1 new paragraph to the docs.
*Put in SpecialCombatHandler Routine which replaces WaspNestHandler
*Roper, Wasp Nest, Pool, Volcano, Apple Tree are now ordinary items which
have SpecialCombat.
*New predicate isSomethingThere(cell)
*Modified RangedCombat routine to take into account CR_LOS. Now we can
make creatures which have distance weapons that don't require line of
sight.
*Added new predicates: AttacksLiving, AttacksUndead, isUndead
*Modified maiming routine to not maim on negative combat.
*Fixed Predicate.tex with modified predicates to use the new char_stat.Stat
method.
*Completely absorbed SpecialFlags into char_stat.Stat.
*We can now have creatures that gain or lose flying ability.
*UNDEADFLAG has now been translocated into char_stat.Stat with UNDEAD_STAT
* A. Lich and Lich Lord and Raise Dead have been modified appropriately.
* B. search/replace all UNDEADFLAG, #define UNDEADFLAG. Done.
C. Decide what to do about slime covering you over. I guess just have
oldchar_stat
* C. There was a bug with Magic Sword and Magic Knife: If the wizard
already had MAX_COMBAT and then cast Magic Sword or Magic Knife then
he did NOT gain the abiltiy to attack undeads because the sword/knife
did not get applied. This is now fixed. The routine is now much
shorter also.
* D. Magic Sword and Magic Bow and Magic Knife now set the appropriate
bit in board[cell].char_stat.Stat
* We can now make creatures which cannot attack living creatures, only
undeads.
* We can now make creatures whose specialcombat affects very specific
groups of creatures and any combination of stats.
* Info Screen graphing is now even better!
*I have Considered making Stat an int to eliminate many warnings
but I have decided that it would be much better to just change the
functions that generate the warnings into macros. This results in a
faster game. A small macro should be slightly smaller than a function call.
The macro saves 4 bytes by not using bsr/rts and I guess it saves about 8
more bytes because of not pushing and pulling the parameters on/from the
stack like a function does. But it should use more bytes by having in-line
code. All in all it should save a few bytes per macro, as long as the
macros are simple 1-line commands.
I am certain that macros are faster.
* Experiment: Change the following functions into macros and recompile to
measure the code size difference:
isStatic, isMount, isDragon, isGrowth, isInanimate and isMeditation.
isFlying could be converted to a macro but that would require that
WizardWings set the flying bit on the wizard rather than setting the
.Wings bit in the wizard structure. Why not have WizardWings simply set
both bits for now?
Chaos is currently 194476 bytes.
Recompiling...
Chaos is now 194028 bytes. I saved us another 448 bytes! And that
is just for now. The more we use the
macros in the future, the more we save!
The game is now somewhat faster.
*ShadowForm, .Shadow, ShadowFormID -> Irvine's_Invulnerability
*Heal and HealID -> Restoration.
*Modifified Sencode.c so we can now have spellnames with ' in them.
* info screen has now been revamped to show all the new stats in a graphical
manner.
*DELETE UNDEADFLAG AND isLivingAttackingUndead from the program forever!
*Edited the tex in spell.tex
Begin version 1.7.2:
*Replaced all occurences of board[cell].??? & CLOAKEDMASK with isCloaked
macro. (except 1)
*Translated all the code so the Cloaked Stat now resides in char_stat.Stat
* Replaced all ((board[i].flag & ANIM_STATE_MASK) != DEAD) with
(!isDead(i)) macro
* Translated all the code so that Dead Stat now resides in char_stat.Stat
*Sleeping Creatures now stop being animated so you can see that they are
asleep.
C SUX! C SUX! I just wasted the last hour trying to figure out why the
hell this program wouldn't compile. It turned out that it WASN'T doing
predicate.tex even though I had saved it TWICE and reloaded it to make sure
that everything was there. It just ignored my changes and kept using an
old version that was somehow missing a ).
Transfer over the other flags like cloaked, dead, asleep, static.
I was going to transfer over asleep and static but static should never
change so hopefully I can ignore that. That leaves asleep... I'm not sure
if I should have asleep in both cell.flag and char_stat.Stat for now or
what. 1st I will simply replace all:
((board[i].flag & PLAYER_MASK) >> 3 != ASLEEP) )
with !(isAsleep(i)) to make things easier to read, etc.
I was really cautious with transferring over ASLEEP. Perhaps when I know
the program better I will make things more elegant and simple.
* Translating dead and cloaked into char_stat.Stat is turning out to be a
real bitch. Probably something will be messed up somewhere.
Hmmm.. Everything seems to be working perfectly except for the fact that
Computer controlled shooters keep shooting dead bodies. Perhaps I forgot
a ! somewhere? Hmmm... the computer controlled shooting looks ok and so
does the macro. Strange. I don't know what is wrong.
Cloaking isn't working. 2 point attacks damage. Cloak graphic not drawn
on screen. Ok I think I fixed everything. Dead, cloaked, asleep, static
will reside in both board[cell].flag for the animator and
board[cell].char_stat.Stat for everything else.
Part of the reason I want to have dead and asleep in char_stat.Stat is so
that we can eventually have sleeping and dead creatures that belong to
someone. That would allow us to make more wierd spells that only affect
your own or your enemy's dead creatures, etc.
* I spent all day reading the SASC manual about smake and codeprobe.
* Enhanced the smakefile
* Used codeprobe to figure out that screwey bug with dead creatures. Now
everything works perfectly!
Weird bug with simulacrumming a wizard.
I was controlling 2 different wizards who were not in an alliance with each
other. I had Double in effect. I double simulacrummed the other wizard.
I simulacrummed the original and then I simulacrummed the copy.
I hopped one of the wizards on a unicorn and it just disappeared. It wasn't
there and it couldn't dismount. Ever. The unicorn was still there but not
the wizard.
The following 3 things were psychologically torturing me:
*1. WriteBottom always wrote text off the bottom of the screen
*2. All the -1's for accessing the Team[] array
3. All the -1's for accessing the wizards[] array
Now I will attempt to eliminate all these -1's from the program. I sure
hope this works because it is very confusing to me, trying to tell which to
use, player or player-1. 1st I will attempt to convert Team[] since there
are only about 19 occurrences of Team[] to convert.
Chaos is currently 197156 bytes.
Well, that wasn't much fun at all. I ended up having to add some +1's to
the program due to the way loops and variables were pre setup so it
cancelled out a bunch of the advantage I was trying to get.
Chaos is now 197136
*Team[] now goes from 0 to 8. 0 is not used but is saved and loaded.
Now we just check Team[player] instead of Team[player-1]
I think I will just pass on the wizards array, though I really wish it was
based on 1 to 8 to match the wizard #. Too much of a chance of me
introducing a new bug that I can't fix.
*Modified the following creatures to take advantage of the new combat system
*1. Cobra is now poisonous.
*2. Halfling is now _very_ magic resistant.
*3. Mind Flayer now really attacks intelligence.
*Creature Recovery now handles negative recovery rates (Poison), though it
won't actually kill you yet.
*Fixed description of Justice spell.
*Numeric keys show player's creatures in RED1 if they have moved and in
WHITE if they haven't moved.
My upgrade was going along just fine until I tried to move the dead bit
into char_stat.stat. Now I actually made bugs. Hopefully they are all
fixed now.
* Fixed Lich spell description.
* Pool is now a regular spell. In my opinion it is hard enough to use due
to Eagles and things that fly up at it and also because it adds the
"Repair your forces" play mechanic to the game.
BUG: LoadGame no longer works.
Begin 1.7.3
*Made 2nd info screen to show all stats such as CR_LOS, Attacks_Undead,
Favorite Food, Afraid of, etc.
This is something that I've been wanting for a very long time! Now I can
see EVERYTHING about a creature.
*Made 2nd SpellInfo screen with all casting attributes. This is something
that I have _REALLY_ been wanting for a long time! I am always casting a
spell and then I find out that I can't cast it where I want to so I have
to abort it! I have 3 times tried to cast armour on a Violet Fungi during
an important game and it wouldn't let me.
*Give the archers actual archery skill. Reduce their range to keep the same
play balance as before.
*Give the archers 1 point of Magic Resistance recovery since their
description says they have a pure heart and have high magic resistance
*Removed archery skill from inanimates and growths.
Replace GetCell(x,y) with an array.
Make Getx(cell) Gety(Cell) with an array to replace all that division and stuff.
Would GetCell really be faster? Hmmm... I suppose not.
Would Getx(cell) and Gety(cell) be faster?
I think so. Since now each one uses a division instruction but accessing
a 1-dimensional array requires no multiplication or division, just 1
addition to add the subscript to the base. This will be MUCH faster on the
A500. Unfortunately, I have just looked around through the code and it
doesn't seem that it gets used all that much. I'll have to use an int to
prevent warnings so the question is will it be worth the 1k of ram that it
will use?
*Earthquake movescreen effect.
* Horziontal_Shake
* Vertical_Shake
* Diagonal_Shake
*Changed Move.tex so that elementals, generators, Stone Giants
and StoneGolems and EarthQuakes shake the screen when they die.
*When an EarthQuake grows, the screen shakes.
*Speeded up screen scrolling in start.tex. At first this made it smoother
but now it is yucky. It is rather random.
Show team on info screen. Need Sean to redo near/far hunks or something.
Show corpse (if any) on info screen somewhere.
*Fixed bug with identification of bonus spells on spellinfo. Another one of
those -1 things threw me off.
*Show Powerups like combat, recoverboost and speed on info screen. I've been
wanting this feature for a long time! I am always having 3 creatures that
look alike EXCEPT for that 1 of them has Combat. And then I have to click
on each 1 of them and look down at the combat stat to find which one it is.
Now the little Combat symbol is up there as a powerup so it is easier to
spot. Looks cool too.
*Eliminated Plastic looking borders on info screens. Now looks more
slick!
* CR_LOS is now more sensibly known as Archery in the program.
Some sort of bug with scrolling credits. After 20 minutes or so the
machine locks up.
* Changed it so that creatures without ranged combat no longer have a
CombatApply mask on life for ranged combat.
* Adjusted Magic Bow and Magic Wings so they would work 100% with the new
system.
Begin 1.7.4
*Set ATTACKSLIVING_STAT and ATTACKSUNDEAD_STAT for lichlord and
Magic sword/knife/bow. (move.tex/cast.tex)
*"fixed" LichLord, Simulacrum, Replicate, Vortex.
* Show allies on number keys. + change the docs.
* Allegedly fixed it so a wizard in a castle or tree can attack enemies.
* Joe made me put in numeric keypad support.
* put in new stat in cast.tex called CAST_GROWTH because the computer just
cast 6 raise deads on 6 different orange jellies.
* Things like walls and pits can now be cast ON growths.
Begin 1.7.5
* Fixed that annoying empty dead cell bug.
* Fixed Tempests so they don't distort space.
Sometimes the Bonus Spell window ONLY displays Hide spells. Once this
starts it never seems to stop; every bonus spell for the rest of the game
is displayed as a Hide spell.
* New method of showing what stats are attacked by combat.
* Optimize the highlight routine.
* The highlight routine is tooo slow so I am implementing xpixel[cell] and
ypixel[cell] which will save 2 divisions and 2 multiplications and 2
additions per relevant cell. Highlighting a screen full of creatures,
growths and allies was just tooo slow.
* Purple combat conflicted with pink recovery so I changed Combat to BROWN.
* Growth rates were incredibly high so I doubled GCEILING to slow them down
some.
* Fixed the DarkWood so they now attack and while I was at it I changed
their abilities and description a bit.
* RMB now cancels info screens properly.
* Shortened ScreenShakes.
* Fixed Touch of God to set CombatApply Combat and Ranged Combat for Life.
* Now Info screen shows BrainBoost, MagicShield and Armour powerups.
* Team Icon now displayed on Score Screen and TeamScore screen.
* Collapsing meditations now give at least 2 spells to pick from.
Test 8 human players with 20 spells.
Vitality Icon -Speed icon Command Icon. I vote .5 points for. Joe votes 1
point against Joe wins.
* Team scores are now displayed but they are not sorted correctly.
BUG:
Start a game with 8 human players and 20 spells each.
If you cast and discard then everything is ok. If you don't cast but you
do discard then everything is ok. But if you cast and then don't discard,
the next player loses a spell (only starts with 19).
* Pick your bonus spell even if it is only 1. This way you _know_ that you
got a bonus spell and you know exactly what you got as a bonus spell.
* The old sound system hogs 2 audio channels. As a quick fix I just
commented out the code for 1 of the channels so now it only uses/hogs 1
channel.
----------- LONG HIATUS ----------
Begin vesion 1.8:
* July 1997: Made a teensy weensy correction to the docs.
* Outlined some further ideas on gameplay in English.
* fixed some serious problems in the makefile. I had added some new
functions into cell.tex and then called them from prog.tex but the game
wouldn't compile because it kept complaining that there were no prototypes
declared for the functions (but they were declared properly in cell.tex).
The trouble was the makefile was trying to recompile chaos without FIRST
recompiling cell.tex. cell.o wasn't listed as a dependency. Now it is.
Same thing with start.o.
Presumably just about EVERY file should be listed as a dependency for
Chaos. And probably MANY files should be dependencies of many other
files... There must be a JILLION other bugs just waiting to happen in the
makefile.
Ok, now cell gets redone EVERY time I do anything. I just made one little
change to start.tex and now cell.tex AND start.tex and spell.tex and
cast.tex and info.tex, cmove.tex, move.tex, score.tex, warp.tex are ALL
being recompiled!! 8(
Ok, I just waited half an hour for my program to compile before I noticed
that tex2c was caught in an infinite loop and was making an infinitely
large sized cell.c file. (There was no \end{verbatim} at the very end of
cell.tex
* Added the following color effects to cell.tex:
* The FadeTo___Scale routines fade the foreground only. The background stays
* black.
* FadeToGreyScale (Fade the whole screen to a b&w photograph)
* FadeToRedScale
* FadeToGreenScale
* FadeToBlueScale
* FadeToCyanScale
* FadeToYellowScale
* FadeToMagentaScale
* FadeToColor (Fade the whole screen, including the background, to a SOLID color)
* LowLevelFade (fades to any colorscale)
* Added new global variable vp to be the pointer to the viewport of the game.
I needed this for my asm animator routine.
* Replaced all occurences of &(screen->ViewPort) with vp thus saving a few
bytes and cycles.
Problem: You click on a creature and then you think about where to move
him. Where is he most needed? Which direction should he move? Should he
attack the weak creature or the strong one? Who's creature is that over
there anyway? .... So you highlight the ? mark and you look around at all
the different creatures and one thing leads to another and pretty soon...
You've forgotten which creature you were moving! I've noticed this
happening on a regular basis with people who are playing a big complicated
game. Sometimes the phone ringing can cause this same problem.
Solution:
* Added animated sprite to highlight the creature whose turn it is.
Utilizes 50 fps animation so it really catches your eye. I drew a simple
little 4-frame animated sprited for this purpose. Hmmm... 50 fps is
actually TOO fast (at least for this particular sprite) so I slowed it
down to 25 fps.
* Successfully linked an asm routine to the C main program and shared
variables between C and asm. Gee, it only took me 20 hours of mortal
combat with the Slinker to achieve this... I eventually just set
data=far for EVERY module to get it to work right. I'll fix it to
use near data later.
* Modified the makefile to take into account the new asm files. BTW: the
compiling/linking process seems to go quite fast when I just make a little
change to move.tex or cmove.tex. The makefile seems to really be doing
its job now. 8)
* Replaced all occurences of
(cell % GAMECOL) * 16 + 8; and (cell / GAMECOL) * 16 + 8; and
((cell % GAMECOL) << 4) + 8 and ((cell / GAMECOL) << 4) + 8) WITH:
xpixel[cell] and ypixel[cell]
* Many small fixes to TeXnotes.
BTW: My brain had begun thinking in C and I had planned to simply make my
sprite-highlighter routine and my animator routine in carefully coded C. I
decided I'd do it in C and then MAYBE way later on convert the whole thing
to asm. So I wrote up my sprite-animator in C and then it wouldn't compile
my 0b1000000000000001 numbers. I asked numerous people on the net and they
all said "C can't do binary numbers" (!) WTF!? So I got REALLY mad at
how lame C is because I like to SEE my and/or/xor masks visually in my
program. In fact I got so mad that I just rewrote the whole thing in asm
and now I'm glad I did. But don't worry, when we convert to another
computer I can translate all the asm code to C no problemo amigo. 8)
My sprite was in binary numbers because I designed it in Cygnus Ed
Professional as a series of binary numbers.
* Animation Upgrade Plan:
* Phase I: Shifted the map over to the left edge of the screen so all
graphic writes are now word aligned. The Blitter is a 16-bit processor.
The old system had the blitter doing the following things:
1) Read Source data of 1 word.
2) Read *2* destination words. (since they were unaligned)
3) Shift the source data over and mix it with the destination data and
then write out the *2* destination words.
That is a total of 5 Bus accesses!
Now that I have word aligned everything the blitter just does:
1) Read Source data of 1 word.
2) Write destination data of 1 word.
Only 2 bus accesses!! So the blitter operations are now more than 2.5x
as fast! Unfortunately after factoring in CPU overhead it may work out
to only about 2x as fast.
This was also neccessary for my upcoming assembly animator which will get
even more speed as a result of the even alignment.
You can still tell where the edge of the map is because the
mouse pointer stops at the edge. If that isn't good enough then just
tell me and I can make a 1-pixel-wide sprite that marks the edge.
I left you a 1-pixel edge on the top of the map. 8)
* Phase II: Static and empty cells are NO LONGER REDRAWN by the animator.
If it isn't animated then the animator doesn't need to draw it. So on
average this doubles the speed of the animator. In the WORST case it
will go the same speed as it used to go. In the BEST case it goes about
238x faster! On average it should cruise 2x as fast as before.
In order for phase II to work, all cell effects routines that damage the
graphics of multiple cells are now modified to set RedrawAll=YES so the
animator will redraw all objects during the next cycle. RedrawAll is a
bit misleading since it doesn't redraw empty cells at this time.
(Currently the game is so well-behaved that it doesn't need empty cells
to be redrawn.)
I have implemented much of Phase II at this time but I have to send you
an update in 36 hours so I am putting it ON HOLD due to the fact that
updating cast.tex may be troublesome... I just don't know yet. This new
animation philosophy means that when the game modifies the graphics in a
cell then it should set them back to way they are supposed to be at the
end of the routine. Routines cannot depend on the animator to redraw an
inanimate object. Some routines in the game are set to work fine with
this new philosophy, other routines are ???
* Doubled the speed of the BoardEffect C code.
* Retargetable graphics upgrade: Retargetable graphics are needed so the
game can inherently work with 16x16 or 32x32 or 32x16 or 16x32 or even
64x64 cells. This is needed for a variety of reasons and since my
xpixel[] and ypixel[] arrays have already done much of the work I may as
well just make the rest of the changes that are needed to complete this
new capability:
* Replaced all appropriate occurrences of 16 with CellWidth or CellHeight
and 8 with HalfCellWidth or HalfCellHeight in Cell.tex, move.tex,
cmove.tex and prog.tex and cast.tex. I didn't touch info.tex.
I'll have to do that one when the day comes.
You should look over TELEPORTIN and TELEPORTOUT in Cell.tex because I
think they need further adjustment to make them handle any size of cell.
In the future don't use the constant 16. Use CellWidth or CellHeight
instead. Don't use 8. Use HalfCellWidth or HalfCellHeight instead.
CellWidth, CellHeight, HalfCellWidth and HalfCellHeight are variables and
not #defined because we may someday have the capability of letting the
user choose his displaymode and his tilesize at run time.
* I talked to an Amiga guy about his favorite strategy games. (He had no
idea that I was co-coder of Chaos) He mentioned Chaos as one of his
favorite strategy games. I asked him lots of questions about Chaos like
what are its good points and what are its bad points and what kind of
game is it? And stuff like that. He said a lot of interesting things.
One of his main complaints was that the computer moved to slowly. Well,
I had just been waiting for a real life gamer to complain about the speed
to justify spending some time looking over cmove.tex. Now that I've
looked it over Here is my report:
* Speeded up GetWizardWeight
* Speeded up ChooseDestination
* I just figured out how to speed up computer movement an additional 4x
but I doubt that I can get it programmed in before the Sunday Morning
deadline.
* I just spent 10 hours fiddling with slinker settings and recompiling and
adjusting code and moving data into __far and reading manuals but nothing
worked! I could NOT get Chaos back to using near/far data again. So I am
giving up in frustration and I will try again in a few months when I know
more. In the meantime, the makefile is already set to do data=far on
every module so at least the game works.
* I can't think of any reason not to be passing parameters in registers.
This is faster and takes less memory. So I will now modifiy the makefile
to do parameters=register. This should save us about 3k off the size of
the executable. Chaos release is currently 235328 bytes
<Several hours later> Geez... it kept giving errors about undefined
symbols and stuff.... Ok I FINALLY got it all figured out and it is
compiling properly. Chaos is now 231892 bytes for a savings of 3436
bytes! That works out to about 512 bytes per hour of work....
* I've now read the docs about saveds and I understand it now. I can't
think of any reason why we need to compile the whole game with saveds.
Only the Animator Task needs __saveds in its definition (which it has had
for some time now.) So I will now remove saveds from the makefile and
save about another 1k. IF YOU KNOW OF ANY OTHER FUNCTIONS THAT NEED
__saveds THEN PLEASE JUST ADD THE __saveds keyword to their definition
and also tell me about the function so I'll know about it. Thank you. 8)
* Chaos is now only 229696 bytes thus saving 2196 bytes!!!!
I assume we can save another 20k once we figure out how to start using near
data again.
--------- SUNDAY DEADLINE HERE --- COULD NOT REACH YOU ---------
* All this time my HighlightSprite was messed up and nobody ever noticed
it. But when I stared at it I noticed that the right hand side was
messed up somehow. It turned out that the right side of frame 3 was
exactly the opposite of how it was supposed to be. FIXED.
* I just found this: ftp.waikato.ac.nz Maybe we could FTP in the future?
Then I wouldn't have to do that weird compress or whatever.
* I rewrote SqDistance in optimized assembly code. It is now 11x as fast
as before. C version took about 1834 cycles while mine takes only about
156 cycles. Cycle times listed are for 68000. I am hoping this will
translate into making the computer creatures move 4x as fast because
SqDistance is in the inner-innerloop and gets executed a LOT.
* Ok, I've gone all through cast.tex and made the changes to keep it
in sync with the new animation system. CellEffect does not redraw the
cell at the end so the caller must redraw it if needed. (It usually is
but not always.)
* ReDrawCell now explicity redraws BLANK cells as BLANK cells. So now it
will erase any damaged graphics. It also does its work within an
Obtain/Release Semaphore pair.
* I was wandering through the program, implementing Phase II of the new
animation system when I found the following messed up code.
Check it out: .... 30 minutes later... oops... I thought I'd found a
major bug. But it turns out to just be messed up indentation. I made
the necessary adjustments.
Collapse magic castles, dark citadels and magic woods as appropriate.
\begin{verbatim}
if (((id == MagicCastleID || id == DarkCitadelID) &&
(MSGRandom() % CASTLE_COLLAPSE) == 1) || (id == MagicWoodID &&
GetWizardCode(i) != NOTHING && (MSGRandom() % TREE_COLLAPSE == 1))) {
int player;
player = GetWizardCode (i) - 1;
ObtainSemaphore (&BoardLock);
board[i].id = NOTHING;
ReleaseSemaphore (&BoardLock);
CellEffect (i, EXPLODE);
ObtainSemaphore (&BoardLock);
if (player >= 0) {
board[i].id = wizards[player].id;
board[i].flag = wizards[player].flag;
board[i].char_stat = wizards[player].char_stat;}
else {
board[i].id = 0;
board[i].flag = 0;
board[i].char_stat = InitialData[NOTHING];}
DrawCell (&NothingImage, i);
ReleaseSemaphore (&BoardLock);
board[i].oldid = NOTHING;
board[i].oldflag = NOTHING;
board[i].oldchar_stat=InitialData[NOTHING];
if (isWizard(i)) {
sprintf (text_store,"New spell for %s", player_name[player+1]);
WriteBottom (rastPort, text_store);
AUDIOPlay (1000,10,1,20);
wizards[player].BonusSpells += 1;
wizards[player].BonusSpellsPick = 2 + MSGRandom() % 3;}
}
}
}
* I have changed the animator to do only _1_ Obtain/Release Semaphore pair
per update. This saves 474 jsr/rts combos per frame resulting in a
significant speed increase in the animator task.
I traced through ObtainSemaphore and ReleaseSemaphore and counted the
cycles. All cycle times are from the 68000.
ObtainSemaphore Trace:
12 LEA 07583670,A0
20 MOVEA.L 0004,A6
18 JSR FDCC(A6)
12 JMP 0XF82E50
16 ADDQ.B #1,0127(A6)
16 ADDQ.W #1,002C(A0)
8 BNE.B 0XF82E68
28 MOVE.L 0114(A6),0028(A0)
16 ADDQ.W #1,000E(A0)
10 BRA.W 0XF82954
16 SUBQ.B #1,0127(A6)
8 BGE.B 0XF82966
12 TST.B 0126(A6)
8 BGE.B 0XF82966
12 TST.W 0124(A6)
8 BMI.B 0XF82968
16 RTS
TOTAL:
236 CYCLES! *238*3=168504 cycles for a screen full of animated objects at
a VERY low framerate of only 3 fps.
ReleaseSemaphore Trace:
12 LEA 07583670,A0
20 MOVEA.L 0004,A6
18 JSR FDC6(A6)
12 JMP 0XF82EA6
16 ADDQ.B #1,0127(A6)
16 SUBQ.W #1,000E(A0)
8 BNE.B 0XF82EBE
20 CLR.L 0028(A0)
16 SUBQ.W #1,002C(A0
8 BGE.B 0XF82EE0
56 MOVEM.L D0-D1/A0-A3,-(A7)
4 MOVEA.L A0,A2
8 LEA 0010(A2),A0
12 MOVEA.L (A0),A1
12 MOVE.L (A1),D0
8 BEQ.B 0XF82F18
12 MOVE.L D0,(A0)
6 EXG D0,A1
16 MOVE.L A0,0004(A1)
4 MOVEA.L D0,A1
16 MOVE.L 0008(A1),D0
14 BCLR #0000,D0
8 BNE.B 0XF82F70
4 TST.L D0
8 BEQ.B 0XF82F20
4 MOVEA.L D0,A1
16 MOVE.L A1,0028(A2)
16 ADDQ.W #1,000E(A2)
4 MOVEQ #10,D0
18 JSR FEBC(A6) ------------->
12 JMP F82826
8 LEA 001A(A1),A0
20 MOVE.W #4000,00DFF09A
16 ADDQ.B #1,0126(A6)
20 MOVE.L (A0),-(A7)
20 OR.L D0,(A0)
16 MOVE.L 001E(A1),D1
6 AND.L D0,D1
8 BNE.B 0XF82886
16 CMPI.B #04,000F(A1)
8 BNE.B 0XF82896
14 AND.L 0016(A1),D0
8 BEQ.B 0XF82896
4 MOVE.L A1,D0
12 MOVEA.L (A1)+,A0
12 MOVEA.L (A1),A1
12 MOVE.L A0,(A1)
16 MOVE.L A1,0004(A0)
4 MOVEA.L D0,A1
16 MOVE.B #03,000F(A1)
8 LEA 0196(A6),A0
18 BSR.W 0XF819E6 -------->
12 MOVE.B 0009(A1),D1
12 MOVE.L (A0),D0
4 MOVEA.L D0,A0
8 BEQ.B 0XF819F8
16 MOVE.L 0004(A0),D0
16 MOVE.L A1,0004(A0)
12 MOVE.L A0,(A1)
16 MOVE.L D0,0004(A1)
4 MOVEA.L D0,A0
12 MOVE.L A1,(A0)
16 RTS ---------------------<
14 CMPA.L 0196(A6),A1
8 BNE.B 0XF82896
16 SUBQ.B #1,0126(A6)
8 BGE.B 0XF828A4
20 MOVE.W #C000,00DFF09A
12 MOVE.L (A7)+,D0
16 RTS----------------------------<
60 MOVEM.L (A7)+,D0-D1/A0-A3
10 BRA.W 0XF82954
16 SUBQ.B #1,0127(A6)
8 BGE.B 0XF82966
12 TST.B 0126(A6)
8 BGE.B 0XF82966
12 TST.W 0124(A6)
8 BMI.B 0XF82968
16 RTS
1164 TOTAL CYCLES! *238*3 = 831096 cycles!
1 Obtain/ReleaseSemaphore pair takes 1400 cycles.
Since it should only take about 1800 cycles to draw one cell this has
nearly doubled the speed of the animatortask yet again.
If the board was filled with animated objects which were being redrawn at
the very slow speed of only 3 fps then that would take 999,600 cycles per
second on the A500. That is about 14% of the total available CPU power
being constantly used just to execute Obtain/ReleaseSemaphore statements.
BUG: When you run out of spells in Texas Trash'em the game gets stuck. You
can't choose a spell or exit the spell-choosing phase. You are just stuck.
I played a test game on the 7.15909 Mhz 68000 and the computer casting of
trees was unbearably slow. Once I find the code that controls this then
I'll see about speeding it up some.
* I just noticed that the animator is still animating at full speed even
when the spell and creature information panels are being displayed.
I had noticed a long time ago that the spell info screen is filled with
text rather slowly on the 7.15909Mhz 68000 so I have adjusted the
information panels to stop the animation while they are up. This
will speed up the display of text a bit plus lighten the multitasking load
on the system while the gamer reads his spell description. BTW: This is
a good example of the clipping that the OS DrawImage routine does. It
clips the whole entire image and draws nothing when a full screen window
is up.
* Made some corrections to the TeX of msg.tex. Maybe I'll rewrite
MSGrandom in asm for a 2x or 3x speed increase. Woops, nevermind. q is
127773 which won't fit into a word. The 68000 can only divide a longword
by a word. To divide a long by a long you must use an actual math
routine so it may just as well be the C math routine. 8( However if we
ever made an 020+ version then I could easily make us an asm MSGrandom
since the 020 and up can divide a long by a long.
* New function: WaitVBlank for display synchronized waiting.
***** NEW INTRO
* Replaced old intro with "something more spectacular".
* Quadruple the resolution of the old intro.
* Same number of colors as the old intro (since the old one only used 8
colors this was not hard 8) I only used 8 colors to conserve chipram and
hopefully be able to include one of my Chaos Theme Songs along with the
intro.
* Smooth Scrolling.
* Colorfading effect.
* The text has different colors and shadows each time for variety.
* ExtraLarge, easy to read, colorized fonts.
* Quadruple-Channel music played with the rather lame, buggy and
system-unfriendly ptreplay.library.
* As far as strategy games go, the new intro-credits-presentation is fairly
good but it is still quite lame compared to Action Games and
Action/Strategy Games.
***** END NEW INTRO
OOPS! I was just about to add background music to the intro so I looked at
my filesizes: 410k, 550k, 393k, 250k. Hmmm.. The intro music may just have
to require 1 meg of chipram. Maybe the 250k one will fit. The 250k one is
the simplest sounding one though.
I also have a SPECTACULARLY GOOD LOOKING 16color super-well-textured
ColorFont that we could use in the intro but the font is about 400k so I'll
probably just use it in the "2 Megs of chipram intro".
I couldn't do anything all day saturday or sunday due to lack of
electricity.
* PROBLEM:
Games which require fonts to be copied into FONTS: have the following
drawbacks:
1. A lot of people have a FULL SYS: so there is NO room for new fonts.
2. It makes installation more difficult. Its just one more file that
someone might forget to copy.
3. When a person deletes the game from their harddrive, the stupid fonts
are still in the FONTS: cluttering up the dir.
4. I've played MANY games from aminet which required copying fonts into
FONTS: and I've played several games from aminet which required me to
copy NOTHING but the game drawer onto my harddrive. I always get a
positive feeling when I just click on the gamedrawer of the game and
drag it onto my harddrive and VOILA I am done! That is how a game
should be; easy to start up without even the TINIEST hassle.
5. There are LOTS of lamers out there who are not good at copying files
anywhere and just end up screwing things up.
6. There are LOTS of other lamers out there who just won't bother with a
game if they have to manually copy something. These people will just
never play our game. Remember, there are lots of "ordinary" people
out there who are not "into" computers like we are.
7. I find it annoying when games have to have files copied into FONTS:,
LIBS:, DEVS:, L: and S:
8. After years of using my Amiga, my HD (especially FONTS: and S:) are
cluttered up with tons of files which now serve no purpose since I
deleted the game years ago.
9. Games (and all other programs) which put config files in S: are annoying.
They should keep all their config files in their own damn directory.
10. Games (and all other programs) which edit your startup-sequence to add an
assign to their dir or subdir are HIGHLY annoying. Let's see, I paid
$400.00 for a state-of-the-art desktop publishing program with an 800k
main executable and they couldn't include a few lines of code to do their
own freaking assigns?!?!?! Or find their files on their own some
other way?!?!?!
11. I guess you are aware that programs which add assigns to your
startup-sequence are VERY common in the Amiga community. I've never
liked this because when you go to delete the program from your HD, YOU
CAN'T! You have to UNassign the assigns THEN delete the program
and/or you have to edit your startup-sequence. These are things that
a gamer person should not EVER have to do. Indeed, most gamers don't
know HOW to do such things, that's why they bought Sega Genesis and
Nintendo machines.
12. Ideally, a game should be totally self-contained. Self-contained
games are just SO easy and fun to install and play.
I haven't worked out how to make Chaos be completely self-contained and
I don't know yet if such a goal is desirable for our game but all the
problems MUST be eliminated.
* PROBLEM:
I tried to open "fonts/union.font" (so it would just load the font from
the current dir that chaos was running in) but it absolutely WOULD NOT
WORK. So I was stuck doing what most everybody else does and that is
requiring the font to reside in FONTS:
* SOLUTION:
After spending all day experimenting and talking to different programmers
and doing research, here is what I worked out:
1. The programmers all told me the same thing:
A) Ditch 1.2/1.3 and just require OS2.04+ (indeed this would have
made things MUCH easier.)
B) Under 2.04+ you can just use PROGDIR: or you can just use the
GetProgramDir function.
2. But since I want to keep Chaos playable on every Amiga for as long as
possible and since there are a lot of people who still use 1.3 I came
up with a way that will work on all amigas and OS revisions.
3. I have implemented some simple code at the beginning of CommenceChaos
to determine the currentdir and then Assign ChaosGame: to that dir.
So now we can load fonts from "ChaosGame:fonts/fontname.font" and
everything works great!
4. This nifty way of doing things will become more and more important in
the future as we utilize more fonts in the game.
5. I presume that this has also solved the problems of loading my
ChaosThemeSongs, sound effects and other things.
6. Chaos doesn't require its gamefonts to reside in FONTS:, the user
doesn't have to make any assigns and Chaos does not have to edit the
s:user-startup.
I don't know what to do about libs: I really like having libraries in my
libs: dir but Chaos requires 2 different versions of reqtools.library. It
needs one version for OS 1.3 and another version for OS2.04+. I guess
we'll just have to make an install script maybe... I'll worry about it
later.
* 2 new asm functions: pal and ntsc. To switch into either video mode
instantly on any ECS Agnus equiped Amiga. Which means _any_ Amiga
manufactured in the 1990's plus some of the Amigas from 1989 plus anybody
who upgraded their old Amigas to an ECS Agnus.
* Computer Tree Casting Speedup Plan:
* 1. Getxy(c,&x,&y) asm routine which is around 11x as fast as
x = cell % GAMECOL;
y = cell / GAMECOL;
Replaced the above code in CheckTree with Getxy(c,&x,&y);
** Referring now to DoComputerCast
* 2. Replaced 5 occurrences of isDead(i) macro with the isdead simple
variable.
* 3. REPLACED:
my = i / GAMECOL - cell / GAMECOL;
mx = i % GAMECOL - cell % GAMECOL;
if ((float)(mx * mx + my * my) >= d * d) continue;
WITH:
if ((float)SqDistance(i,cell) >= d * d) continue;
* 4. Rearranged the order of the tests to work faster for trees.
* 5. Logically avoided 5 of the if tests.
* 6. Replaced 9 occurrences of code in cast.tex with Getxy();
1 in prog.tex, 7 in cmove.tex, 8 in move.tex.
I replaced the following form of code sequences. Is this the proper usage
of the & operator in this case??? If this is wrong then please tell me.
Getxy(c,&wizards[WarpWizard[i]-1].x,&wizards[WarpWizard[i]-1].y);
// wizards[WarpWizard[i] - 1].x = c % GAMECOL;
// wizards[WarpWizard[i] - 1].y = c / GAMECOL;
* 7.11 YIPERS! GAMESPACE is not a variable. It isn't a constant either!
It is a #defined _expression_!!!!!
#define GAMESPACE (GAMEROW * GAMECOL)
GAMECOL is a constant while GAMEROW is a variable.
This means that all the zillions of loops like:
for (i = 0; i < GAMESPACE; i++)
are actually having to _evaluate_ GAMESPACE each time through the loop!
That means that the cycles of one of those complicated C multiplication
routines are being wasted each time through the loop.
This was slowing down LOTS of loops. Even the loop for the animator
uses GAMESPACE.
* Above problem FIXED and speeded up.
GetCell(x,y); in ASM!
I just looked at the C-generated ASM code for GetCell(x,y) and I could
definitely make an asm version that is about twice as fast BUT the reason
for this is simply that C is doing a full 32-bit multiply because x,y are
defined as ints instead of words. So now I must decide whether to try to
switch the entire program over to using words for x,y coords or just
writing the asm routine to take the x,y ints and use them as words.
Do you have any opinions on this?
* Test GetCell((UWORD)x,(UWORD)y); to see the code that is generated.
The Trouble is that GAMECOL is defined as an int. hmm....
Change macro to (UWORD)GAMECOL and see what happens.
OK I changed the GetCell macro to:
#define GetCell(x,y) (((UWORD)y) * (UWORD)GAMECOL + ((UWORD)x))
And the C compiler generated MUCH better code; a good 2x to 3x speed
increase. It saved a bsr/rts and *2* multiply instructions plus more!
Here is a listing of the new MUCH improved code:
| 144C 202F 0084 MOVE.L 0084(A7),D0
| 1450 2239 0000 001A-02 MOVE.L 02.0000001A,D1
| 1456 C1C1 MULS.W D1,D0
| 1458 2205 MOVE.L D5,D1
| 145A 7400 MOVEQ #00,D2
| 145C 3401 MOVE.W D1,D2
| 145E D082 ADD.L D2,D0
| 1460 2C00 MOVE.L D0,D6
Now I will test:
#define GetCell(x,y) (((UWORD)y) * (UWORD)GAMECOL + (x))
This should allow us to save 2 additional machine instructions.
| 144C 202F 0084 MOVE.L 0084(A7),D0
| 1450 2239 0000 001A-02 MOVE.L 02.0000001A,D1
| 1456 C1C1 MULS.W D1,D0
| 1458 D085 ADD.L D5,D0
| 145A 2C00 MOVE.L D0,D6
WOW! Check that out! It saved *3* instructions! (6 bytes)
57 occurences of GetCell * 6 bytes=342 additional bytes saved.
Maximum efficiency achieved! No need for an asm version.
* Speed up MSGRandom: Here is the old code (34 lines)
| 0028 2039 0000 0000-01 MOVE.L 01.00000000,D0
| 002E 223C 0001 F31D MOVE.L #0001F31D,D1
| 0034 6100 0000-XX.1 BSR.W __CXD33
| 0038 2001 MOVE.L D1,D0
| 003A E980 ASL.L #4,D0
| 003C 9081 SUB.L D1,D0
| 003E 2400 MOVE.L D0,D2
| 0040 E582 ASL.L #2,D2
| 0042 D480 ADD.L D0,D2
| 0044 EB82 ASL.L #5,D2
| 0046 D481 ADD.L D1,D2
| 0048 2002 MOVE.L D2,D0
| 004A E780 ASL.L #3,D0
| 004C 9082 SUB.L D2,D0
| 004E 2F40 0008 MOVE.L D0,0008(A7)
| 0052 2039 0000 0000-01 MOVE.L 01.00000000,D0
| 0058 223C 0001 F31D MOVE.L #0001F31D,D1
| 005E 6100 0000-XX.1 BSR.W __CXD33
| 0062 2200 MOVE.L D0,D1
| 0064 E581 ASL.L #2,D1
| 0066 9280 SUB.L D0,D1
| 0068 2401 MOVE.L D1,D2
| 006A E982 ASL.L #4,D2
| 006C 9481 SUB.L D1,D2
| 006E D482 ADD.L D2,D2
| 0070 9480 SUB.L D0,D2
| 0072 D482 ADD.L D2,D2
| 0074 9480 SUB.L D0,D2
| 0076 E582 ASL.L #2,D2
| 0078 D480 ADD.L D0,D2
| 007A E582 ASL.L #2,D2
| 007C 202F 0008 MOVE.L 0008(A7),D0
| 0080 9082 SUB.L D2,D0
| 0082 2E00 MOVE.L D0,D7
Here is the new code after changing the C code to use DIVL: (33 lines)
| 0028 2039 0000 0000-01 MOVE.L 01.00000000,D0
| 002E 223C 0001 F31D MOVE.L #0001F31D,D1
| 0034 486F 000C PEA 000C(A7)
| 0038 6100 0000-XX.1 BSR.W @ldiv
| 003C 584F ADDQ.W #4,A7
| 003E 202F 0010 MOVE.L 0010(A7),D0
| 0042 2200 MOVE.L D0,D1
| 0044 E981 ASL.L #4,D1
| 0046 9280 SUB.L D0,D1
| 0048 2401 MOVE.L D1,D2
| 004A E582 ASL.L #2,D2
| 004C D481 ADD.L D1,D2
| 004E EB82 ASL.L #5,D2
| 0050 D480 ADD.L D0,D2
| 0052 2202 MOVE.L D2,D1
| 0054 E781 ASL.L #3,D1
| 0056 9282 SUB.L D2,D1
| 0058 202F 000C MOVE.L 000C(A7),D0
| 005C 2400 MOVE.L D0,D2
| 005E E582 ASL.L #2,D2
| 0060 9480 SUB.L D0,D2
| 0062 2602 MOVE.L D2,D3
| 0064 E983 ASL.L #4,D3
| 0066 9682 SUB.L D2,D3
| 0068 D683 ADD.L D3,D3
| 006A 9680 SUB.L D0,D3
| 006C D683 ADD.L D3,D3
| 006E 9680 SUB.L D0,D3
| 0070 E583 ASL.L #2,D3
| 0072 D680 ADD.L D0,D3
| 0074 E583 ASL.L #2,D3
| 0076 9283 SUB.L D3,D1
| 0078 2E01 MOVE.L D1,D7
The line saved was the expensive subroutine call to perform the 2nd
division operation.
I traced through both versions real quick and it looks like they are both
the same speed due to the ldiv routine containing 2 subroutine calls. It
looks like ldiv does the exact same thing as x / y ... x % y
This is probably a case where ldiv is _supposed_ to be faster but the
compiler writers never made an optimized version. I will leave the
original code intact for now and maybe I will do a detailed cycle count
later.
* Changed:
if ((isGrowth (i) || isCloaked (i)) && spell == CloakID) continue;
if ((isUndead(i)) && spell == LichID) continue;
if (!(isUndead(i)) && (castinfo & CAST_UNDEAD)) continue;
To:
if (spell==CloakID && (isGrowth (i) || isCloaked (i))) continue;
if (spell==LichID && (isUndead(i))) continue;
if ((castinfo & CAST_UNDEAD) && !(isUndead(i))) continue;
Result = faster code = saves the execution of 27 instructions.
* NOW, after all that, computer treecasting should be noticeably faster on
the A500 than before.
Growth Rates are still a bit too high but especially Violet Fungi so:
* I just changed SPUD_CONSTANT from 5 to 6 and FUNGI_RATE from 30 to 40 in
at attempt to keep growths from taking over the world. Now I've played
some test games with it like this and it seems just GREAT! Now it is
working the way I envisioned it! (Except I haven't tested Purple Fungi
yet so I don't know about them.)
Can't see the Ogre Mage shot most of the time so:
* I inserted a WaitTOF(); into the BirdShot routine to hopefully fix this.
The BirdShot uses BLOB_WEAPON which is the easiest to draw. I think it
had just been drawing to fast.
* BUG: Bird Lord shot me and it didn't redraw my cell. (I was invulnerable
at the time, if that makes any difference)
Bird Lord shot another creature and it was redrawn properly.
NOW FIXED.
* The 2nd voice sample in ChaosTheme1 just didn't sound right so I deleted it
and saved 49k. Now my small themesong is only 201k. Hopefully that will
fit into a 512k chipram intro.
**** After months of not playing a single serious game I decided to play a
real game. Here are the results of the Tuesday Playtesting.
A wizard with lots of creatures and a doube-triple put all 6 of his armours
on the _same_ creature even though he had other creatures that were
wounded. He wasted at least half of his armours.
Same game later on... Right now there is a DEAD pegasus. It says dead and
it has the dead image. Yet it has life and people are attacking it. ??
It was next to a shadowwood so maybe when a ShadowWood kills something this
is what happens? This was probably caused by a growth and is probably
FIXED now.
Fire covered up my wizard who was on a horse but it didn't kill my team and
it didn't put my creatures to sleep and I could still play (but without my
wizard).
When I click on the cell that I was on I can see my powerups just like as
if I was in a tree.
Next turn I killed the fire with my creatures and uncovered my wizard and
everything was back to normal.
****** END OF TUESDAY PLAYTEST.
********** Thursday Playtesting. **********
* Thursday: Relatives came over and we played 2 games of chaos. The
first one only lasted about 5 turns because my tree collapsed and I was
simultaneously attaced by 2 Platinum Dragons and 1 Golden Dragon and they
didn't want to play after I was dead. The second game only lasted 5
turns also because the electricity went off. 8( Here are the BUGS we
found:
* HighlightSprite kept highlighting some tree each time it was Matt's turn.
(he was player 3) No big deal, it just looks funny. We kept making
jokes that he must have a "Magic Owl" in that tree or something. FIXED.
* Independent Spiderwebs didn't show up at first due to no ReDrawCell
command. FIXED.
2 different Computer Wizards cast CLOAK and then aborted the spell
because they were in a tree and they had no creatures yet.
They all agreed that the statnumbers should be more uniform. Like all
0-7 or all 0-15 or all 0-63. (or at least nearly all the same)
This subject was brought up because this was the first time they had ever
seen the numbers on the info panel. They _really_ liked that.
*********** End of Thursday Playtesting ****
FRIDAY == 3 WEEK DEADLINE.... Did not hear from you.
**** Friday Playtesting:
* When a growth no longer covers a dead body the body becomes "unalive"
FIXED.
Computer wizards aborted Combat, Cloak, Raise Dead.
A Computer-controlled wizard just mounted an independent Nightmare!
But then someone killed the nightmare so I never got a chance to look at it
on the info screen. Maybe the explanation is that the wizard just subverted
it when I wasn't looking?
4th from the bottom, 7th from the right, the green ooze is being drawn 1
pixel too far down. Cell coords must be off for that cell.
it is DEFINITELY being redrawn 1 pixel too low.
Sometimes the blob is drawn off by about 3 pixels.
I moved my wizard into this strange square and at first it drew it
correctly but then it moved it down 3 pixels. Strangness.
At this point the xpixel[] and ypixel[] arrays are working but the
ancol[]/anrow[] arrays got corrupted somehow. There must be some bug that
writes out some data to a place it isn't supposed to. Possibly it does a
+=3 or a +=4 to account for the 3 or 4 pixel offset.
But there are no occurrences of +=3 or += 3 8(
Now that I think about it, at first it was off by 1 so maybe it was several
+=1 operations somewhere. This is all probably related to the wizard with
LichLord being covered by my green blob.
Whatever bug caused this could easily be causing those spurious crashes.
The game hasn't crashed on me in a very long time.
Blob covered up computer wizard and "killed" him but the game didn't end
and his powerups show when I click on that blob. This might be because the
computer wizard in question has LichLord.
Next Turn:
WOW! Now the covered wizard just cast invulnerability on himself.
He can't attack or move though, apparently.
Next Turn:
Now he just vengeanced my elephant!
Next Turn:
Now he cast a Spectre! And he is still covered up by the green blob.
As far as I can tell this is exactly the way it is suposed to work due to
him having LichLord. I have no complaints. It is just freaky. 8)
**** END Friday Playtesting.
Sunday: Tried to make an autobooting version of Chaos for 1.3. I've done
this before and it always worked but now it loads then crashes. I don't
know why but it might be because of that stupid ptreplay.library.
I went to an awful lot of trouble to avoid using OS2.0+ functions so that
it would work on all Amigas.
Ok, I just tested it and it DEFINITELY is the ptreplay.library that is
causing the crash on the 68000.
Monday-Tuesday Job Fair.
Tuesday Night:
* Speeded up WeaponEffect
* Speeded up ThreeBeam
* On a screenfull of creatures I often can't spot the victim of a
DarkPower/Justice/Exorcise/Vengeance so now the victim is HighLighted.
1 week goes by...
Tuesday Morning: Begin version 1.81
* Improved the Docs to be in sync with the new version 1.8 features.
* Acquired the OctaMED/RBF software play routines directly from
Ray Burt-Frost himself. I have no idea if I am actually going to use
any of it though.
* Put my Lame old icon into the distribution.
1 week goes by...
Tuesday Morning:
* Fixed off-center WizardExplode.
* Changed descriptions of Dark Power, Exorcise, Justice, Vengeance,
Consecrate, Invert and Brain Boost.
* Inserted CheckPixelArrays(); code in the beginning and ending of most
functions to try to find that screwed up mysterious bug.
Violet Fungi growth rate STILL WAY TOO HIGH.
* I have now instituted a new growth formula which will hopefully make the
growths do what we wanted. And I put SPUD_CONSTANT back down to 5 like
it used to be.
On AnRow check it got an error at x=2.
AnRow[2]=0 but somehow AnRowBackup[2]=161!!!!
AnRow[3]=7 but somehow AnRowBackup[3]=65 !!!!
AnRow[4]=0 but somehow AnRowBackup[4]=193!!!!
AnRow[5]=0 but somehow AnRowBackup[5]=97 !!!!
Detected on first line of ReDrawCell, called from cMoveNonEngaged in cmove.c line 316
Power went out. Start over.
5 hours later... Bug detected again. This time an Elemental is highlighted.
AnRow[9]=162 but AnRowBackup[9]=161
AnRow[10]=833 but AnRowBackup[100=65
Called from Reinstate move.c 248 (cell param=224 wizard_warn=0 board[cell].id=59)
which was called by move.c Combat line 539 (defence=224)
* Sheesh! I finally tracked it down completely.
It turns out to be a bad subscript error.
The trouble was with granting a bonus spell to the independents upon
killing a tough creature. In this instance an Independent Elemental
killed a Golden Dragon and so a bonus spell was marked in
wizards[player-].BonusSpells But wizards doesn't have that many elements
(9-1)=8 and wizards highest element was 7.
*** NOW FIXED *** by increasing the size of wizards by 1.
Here is the code that triggered the bug:
if ((bonus = board[defence].char_stat.BonusSpellPick))
{
wizards[player - 1].BonusSpells += 1;
wizards[player - 1].BonusSpellsPick += bonus;
AUDIOPlay (1000,10,1,20);
* Trying out a new growth formula.
* You will notice that there are tons of calls to CheckPixelArrays();
I don't want to go through and delete all these calls because I intend to
use these calls to check for other corrupted variables. So if you don't
like the way it slows your 25Mhz 030 down to 7Mhz 000 speed then you can
just comment out all the code inside the function itself; making it a
null function or perhaps we could use conditional compiling? Smake dev
compiles those lines while smake release doesn't?
* I just came in the room and looked at the screen and I noticed something:
The graphics seemed much more appealing than they used to be. The screen
is filled with all sorts of little animated critters plus loads of webs
and some earthquakes. It just all looks enticing and interesting
somehow. All the extra movement from the faster frame rate makes
everything more exciting.
Monday:
* Allegedly fixed the bug where computer wizards cast Raise Dead on
growths.
* Allegedly fixed the problem of Computer Wizards casting Armour on
creatures with max life.
================== End Version 1.8x ===============================
================== Begin Version 1.9 ===============================
--- Star of changes made by SAI ---
* Incorporated new image data.
* Added C image drawing program, to compile to a "smake image"
* Modified lmkfile and makechaos to generate my chaos font
* Added the following new spells:
Derro, Mud Man, Spriggan, Agathion, Annis, Azer, Banderlog,
Bodak, Cat Lord, Jann, Marid, Shade, Dao, Bandit, Hybsil,
Fire Bat, Shadow Dragon, Spectator, Crimson, Drelb, Haunt,
Juju, Solar, Quickshot, Discard, Boil, Passage.
* Note, I could find not evidence of you changing the descriptions
of Invert, Justice and so on. I assume you did it in pool.txt
but apart from my new spells no significant differences could
be found between the files.
* Fixed the graphics for the golden and platinum dragon.
* Played a game; quickly remembered that I hadn't finished the coding
for all my new spells. The image for Quickshot has some how got
inverted, very strange. There were still lots of dead wizards
lying about the screen. A cloaked sleeping dragon did not appear
cloaked on the screen. The program crashed when a manticore shot
a magic wood tree.
* Made a change in move.tex hopefully to stop dead wizards.
* Added the SPRITES flag to the Chaos screen.
* Discovered that CHAOSANIM is causing a huge number of enforcer
violations. I suspect this may be because there is an unbalanced
ReleaseSemaphore in the program. It seems to start happening
after a wizard dies. I removed my changes, but it didn't improve
the situation.
* My monitor started flickering on an off, so I quickly made up an
archive of what I had done in case it blows up.
* Completed the preliminary coding for the spell manager for creatures.
* Completed spell files up to Stone Golem (it is taking a while to do
each one, but I figure it will be helpful in the long run).
* Perhaps the crashes are due to problems accessing HighLight variables.
* Fixed a bug wherby a dead wizard with the "Uncertainity" spell could
result in dead creatures being case as if they were alive.
* Allegedly modified te freeze spell to work on independents.
-JC tested this and it really works.
* Major Discovery: If I boot from a floppy by-passing my usual startup
then the game worked much better in that JC sprite appeared. Therefore,
I am going to have to investigate my startup sequence to find what
causes this.
* Done spell files up to and including vampire.
* Completed spell files for all objects on the board.
* Whew, I have just finished making spell files for all our
spells (all 255 of them, now I added my new ones). The next
one should be interesting since any byte quantities hanging
around related to spells might break. Well, I won't be
adding any more for a little while anyway.
* Now trying to incorporate changes.
* Change the ordering of spells by swapping LichLord with Mutate
(so that all computer assistance spells come after consecrate).
* Deleted initial_data, names, and speech from prog.tex
* Deleted chaos.prb and ranking information from spell.tex
* Deleted castinfo and computer assist arrays from cast.tex
* Made appropriate changes to make file.
* Now testing the spell manager. Having a few minor problems with the
script I wrote. Added a FAILAT to stop if halting for no real
reason.
* Deleted reincarnation table from move.tex.
* Deleted index.h pool.txt makedata.txt from archive.
* Now trying to remake entire game from archive. Problems: changed
targets for info.o. Fixed problem with index.h. There is a problem
with makedata.txt, for testing overcame by deleting lines. It is
caused by bad referencing of statics. I will have to change the
spell manager to cope with this.
* OK it all compiled and I proceeded to play a game. The was obviously
a problem reading "chaos.prb" because all the spells were unusual ones.
Fixed that problem. But then the game crashed just after a wizard died.
Suspecting my fix to stop dead wizards I have temporarily disabled it.
The whole problem of killing wizards needs a good going over and
rationalization.
* Eventually the spell manager could be modified to print nice tables
of creature abilities for inclusion in the manual.
* Fixed alignment of first set up screen.
* Made the game load my font from a local directory by following JC
example. However, I noticed you used FPB_DISKFONT instead of
FPF_DISKFONT (I wonder who is right). I've left it for the moment.
I wonder if this could have something to do with SetSoftStyle bug.
* Fixed some bugs to do with scoring.
* Allegedly changed Texas'em so that when less than six spells remain
no discard is required. This probably needs some sound to stop people
clicking on each others spells. Tested OK.
* Added variant spider webs, this has pushed the number of spells over
255 and some problems might occur.
* In testing I have observed a number of Enforcer hits corresponding
to long reads. Reasons remain unknown.
* Fixed the loading/saving problem. It was caused by a single line
missing from the start.tex file (InitLoad();)
* Added some mechanism for a turn counter. There is no warning that
the game is about to end, also the scores aren't shown at the end.
* Replaced About menu.
* Added turn counter and discarding flag to the save file.
* Fixed a bug relating to the Dao.
* Elimited the single pixel blue line from the top of the screen.
* Replaced the new game menu.
* Completed implementation of the discard spell.
* Completed implementation of the quickshot spell (image still revesed tho).
* Just noticed that team scoring is broken. Something I changed here
is screwed up.
* Fixed screen clearing when loading a saved game.
* Discovered a potential problem with the semaphore in Reinstate, this
makes sense for the causes of all my recent crashes, attempting fix.
* Split the WeaponEffect procedure into two parts so it is more versatile
(planning to use it in the Quit menu).
* Replaced the quit menu.
* Only the file menu now relies on reqtools, and will continue to do
so in the mean time.
* Since it is possible that JC will lose account I am now making a new
archive and testing a complete remake. If it works I send it.
* Rewrote the Reinstate function, thereby eliminating KillWizard,
Reincarnate and KillElemental.
* Fixed yet another bug to do with discarding.
* Fixed a problem relating to the Eartquake and my change to the Reinstate
function
* Incorporated JC font changes.
* Incorporated JC spell description changes.
* Made the solar always move on its own accord.
* Made the Cat Lord more rigourous. Technically, there should only ever be
one Cat Lord at a time (ok, there are some ways around this, but they
will probably be entertaining if they occur, so I'm leaving them). The
Cat Lord should now move all cats. The latest code does prevent multiple
Cat Lords from being cast or generated.
* Put all the code for CastFree spells in the appropriate spell files.
Modified the spell manager to automatically amalgamate this code and
put it in a file to be included by cast.tex.
* It is still sticking an image when a generator dies. This is wrong. I
think it may be because we are the near the byte limitation, I am trying
a temporary fix, soon I will change all id fields to words instead of
chars.
* Had a brief go at doing favourite food etc., but remembered that because
of a change to the cell scoring (in that it now does it once rather than
for each and every creature) that it will be harder to do this than I had
imagined.
* Completed implementation of the haunt and solar.
* Did some optimisation and tidying up of BoardUpdate.
* Implemented computer discarding for Texas trash'em.
* Stopped computer wizards from attempting Cat Lord while one on screen.
* Fixed a problem with dead graphics.
* Implemented agent casting of general magic spells.
* Completed implementation of Agathion.
* Allowed faun to cast sleep.
* Allowed azer to cast quench.
* Stopped horrors reproducing after the first time.
* Completed implementation of Dao.
* Agents now highlighted and show owner when casting.
* Completed implementation of Jann, Dao, and Marid.
* Stopped Justice, Dark Power, and Vengeance on growths.
* Allegedly fixed scoring (now tested, it looks ok).
* Changed the basic cell id to a UWORD, this gives a lot more freedom
for making new spells.
* Tidied up some of the documentation in prog.tex and moved all the menu
stuff to a separate file, menu.tex.
* Did a complete rebuild, it took 43 minutes.
* Moved all the magic spell handlers to the appropriate spell files.
* Changed the reincarnation table to be USHORT rather than UBYTE
* Made the spell manager write a TeX table of basic abilities. Later I
will make other tables and convert them to PostScript.
* Turned on highlighting for Speed and Slow spells
* Turns remaining now displayed on the far right of the screen at the top.
* Turn counter stuff now works reasonably well. The game will stop when
all turns are exhausted and the scores will be given.
* While team scores now seem correct, the don't appear correctly sorted;
this looks like another +/- 1 type problem, that my brain just doesn't
feel like trying to fathom at the moment.
* Added StartTiming and EndTiming to prog.tex (at the end). Didn't have
time to test it much but hopefully it will do what you want.
TODO:
- Computer use of favourite food stats
- Elimination of reqtools
- More production of TeX/PS tables of abilities.
- Find exec.dis and stamps for JC
- Power up goodies on screen
- Complete Passage [now made prob 0 pending appropriate solution]
- Make computer use of reincarnation more intelligent
- Start of changes by JJC -
* Problem: Start Chaos and Quit. An Alert pops up (like a guru but yellow
and non-fatal) that says "Recoverable Error: 0100 0008"
I looked it up and that means "Damaged Semaphore". NOW FIXED.
* Test a medmod with the cli medplayer program to see if it shares channels
or not. IT DOESN'T.
* Edited descriptions of Marid,Rat.
* Fixed up Timing Code.
* After an hour of getting bizarre results I have reached the conclusion
that the SASC Timer function does NOT have microsecond resolution.
Instead it has 1/60th second resolution and it then adds +/- 1 to 3
microseconds onto that result.
* Implemented asm TestPixel.
Time to Test 32 rows of 320 pixels on a 5 bpl lores screen on 25Mhz 030
ReadPixel 500009us
TestPixel 100002us
So TestPixel is about 5x as fast as ReadPixel.
* When simulacrumming an unanimated creature with double in effect it is not
drawn immediately. In fact it isn't drawn till something triggers
ReDrawAll=YES. NOW FIXED.
Subversion appears broken. Player 1 subverted a White Dragon and it made the
success sound but didn't make it mine. Player 2 just subverted a different
White Dragon and it made the success sound and it DID make it mine... hmm..
The only thing I can figure is that the spell works perfectly and I just
mistook the sound effect.
* I noticed that Reflector always did exactly 3 points of damage to the
shooter rather than actually "reflecting" the damage back to the shooter.
e.g. A White Dragon shot me and it should have "reflected" 9 points of
damage back to him but instead only did 3.
Also, if the wizard had a 15 Ranged Combat Rating then even a Camel would
get hit with 15 points of retaliatory damage.
Also, if an Undead Shooter shoots an ordinary Reflectified Wizard then
the damage does NOT reflect onto the shooter; instead it is an "invalid
attack, cannot attack undead"
So in fact either the spell should be renamed to "Retaliation" or
"Retaliatory Strike" or the Reflector Spell Code should be reworked to
actually "reflect" the incoming damage.
I chose to rework the code so now the exact damage is always reflected
onto the shooter. Even the exact _type_ of damage is reflected:
Intelligence damage is reflected as Intelligence damage. Ditto for
poisoning and all the other stats.
I cast Reincarnation on my Manticore which my wizard was riding at the time
but when they killed my Manticore it didn't reincarnate into a Centaur! It
just died and disapeared like usual! 8(
* Implemented linearly equidistant ascending order bitplanes. Works fine.
From now on all custom gfx routines can gain an extra 15% or more speed
due to this fact.
* Rewrote TestPixel to take advantage of the equally spaced bitmaps but the
timer is so lores that it doesn't show any speed increase. 8(
It should be about 6x faster than ReadPixel now.
Perhaps if I do a smake release then try timing it then I can get more
accurate results.
* Upon noticing that the isLineOfSightTest really does only check the first
4 bitplanes I changed TestPixel to work the same way and made another
optimization as well. Saved about 20 cycles. But I don't understand why
it was only checking 4 bitplanes?? That means that all colors from 16 to
31 are all "transparent" and don't block line of sight. Do any game
objects currently use colors 16 to 31???
- SAI: No this code IS correct. Colours 16 to 31 are used and do block
LOS.
- JJC: Ok it all makes sense to me now.
* Once I looked at isLineOfSightTest I realized that I somehow COMPLETELY
missed this routine before! I just greatly optimized it. It should be
about 2x to 3x as fast as before.
* OK NOW AT LONG LAST, COMPUTER TREE-CASTING SHOULD BE ABOUT 3x as fast as
before!!!!!!
* btw: You can verify that ReadPixel and TestPixel are in agreement by
pressing the a key. The b key measures the speed of ReadPixel and the
c key measures the speed of TestPixel.
*** SPLIT SCREEN TECHNOLOGY UPGRADE ****************
Right now the WriteNearBottom text can go all the way to the edge and beyond
beyond so a hi-res screen will keep it from going off the edge.
* Implemented Split-Screen Technology. Or in the present form it might be
better referred to as Dual-Screen Technology.
I've wanted to do this since December 1996. Well, actually I've wanted to
make a split-screen game since September 1985 when I first saw the Amiga's
HiRes mode. Using dual screens allows the presentation of HiRes
sharp-looking text while also allowing the use of really cool finely
textured 64 color graphics on the A500.
I've seen so many games over the years that could have greatly benefitted
from using a split screen. Every time I see a game that doesn't use one I
want to go into the program and MAKE it use one. EVERY Amiga ever made
(even the original 1985 A1000) supports 640x200 resolution so there is
simply NO EXCUSE not to use it! I want a game that makes use of my
computer's capabilities.
I don't mind large fonts, its just that I do mind _blocky_ fonts. 320x200
text just doesn't cut it for me.
* Changed WriteBottom and WriteNearBottom to work with the new system.
* I had to change the WriteBottom statement in braindrain.spl and nuke.spl
to keep it coordinated.
* New function PutScreen which is easier to work with than MoveScreen.
* I am trying to keep the HiRes screen down to only 8 colors so I had to
eliminate 3 colors from the CreatureInfo screen. 16 color HIRES is
extremely slow.
Color list from info.tex:
GREEN1
GREEN2
BLUE1
PINK
RED3
YELLOW
CYAN
BLACK
WHITE replaced with CYAN
BROWN replaced with PINK
ORANGE replaced with BLUE1
* Translated the above pallete onto the HiResScreen.
* Translated SpellInfo Screens onto the HiResScreen.
* Translated Creature Info Screens onto the HiResScreen.
* Translated Game Loading/Saving onto the HiResScreen.
Now we just have to decide what we are going to do with all that extra
space. Do we use bigger fonts? Do we combine the 1st and 2nd screens
together? ???
***** END OF SPLIT SCREEN TECHNOLOGY UPGRADE *****
>* Subversion of a sleeping creature did not clear Sleeping Stat;
> although the owner was correctly changed.
Ok, I didn't realize that Subversion was supposed to wake creautures up.
Now it does.
>* When a cloaked creature goes to sleep the cloak image disappears;
> although the creature keeps the cloaked stat. That in itself is not a
> problem; however, once woken the cloak image does not return.
Ok, I fixed it so a sleeping cloaked creature who is awakened will show up
graphically as a cloaked creature. Not tested due to problems with
makefile not rebuilding castmagic.c.
* The sequence Cloak->Sleep->Wake produces a cloaked creature on
your side, but although info fails on it, the animated graphic
is visible! This should now be fixed but someone needs to test it to be
sure.
I haven't decided what to do about putting a cloaked creature to sleep.
How do you want that handled? Do you want it to still appear graphically
cloaked or ?
--SAI: Visible, one could assume that maintaining a clock requires effort
therefore a sleeping creature doesn't maintain it.
>* Agents (Dao, Marid, etc.) look at the wrong player when testing for a
> double or triple effect. I suspect this is another off by one effect.
> (Should be easy to find this problem in AgentCast).
JC is not attempting to fix this one due to never knowing whether to use
Array[x] or Array[x-1] or Array[x+1]. Leaving this for SAI.
--SAI NOW FIXED
BUG: smake newspell doesn't rebuild the file castmagic.c from the
individual .spl files. It just ignores the new .spl files and uses the
same old castmagic.c file as before.
btw: I deleted castmagic.c and then did smake newspell but that didn't work
either. It still didn't rebuild castmagic.c
* I added the line "execute spellmanager" to the newspell: part of the
lmkfile. Hopefully that fixes everything relating to castmagic.c
* Fixed all warnings related to warp.tex
* BUG: Closing the FileRequester or selecting CANCEL does not actually
cancel anything. The game still loads/saves the game. NOW FIXED.
* PROBLEM: Whenever the game stops the animation system for a legitimate
reason the sprite also stops. This results in jerky sprite animation
on all Amigas. On the A500 this is especially noticeable since the
sprite spends most of its time in slow motion and jerking arouind in an
icky manner.
SOLUTION: I have Implemented the sprite animation as a vertical blank
interrupt so it will ALWAYS be animated smoothly, regardless of
ObtainSemaphore() or Forbid(). This makes playing the game on the A500 a
zillion times better. This should also allow the sprite to keep up with
moving creatures better.
* I tried to implement the color cycling into the vblank interrupt but that
just didn't work. It turns out that beyond v36, LoadRGB4 and SetRGB4
cannot be legally called from interrupts.
* Implemented new ChaosColorCycler Task which is responsible for all color
cycling. This allows color cycling to continue unabated even when the
CHAOSANIM Task is prevented from running by an ObtainSemaphore.
* Implemented new method for seeing which stats are attacked by Combat,
Ranged Combat and Special Combat. Just click on Combat and the stats
that it attacks will begin flashing. The old method was just never clear
enough for me. Hopefully this new method will make things more clear.
* Eliminated that 1 pixel of empty space from the top of the screen since
screen real estate is at a premium.
* r=Range; s=Shoot; m=Move;
* Pressing the "r" key now shows the shooting range of the current
creature by highlighting the cells that can be shot. Looks kewl!
* Pressing the "s" key now shows the cells that the current creature
can shoot into (taking into account any LineOfSight requirements).
* Pressing the "m" key now shows the cells that the current creature can
move into.
* BONUS: the new "r" and "s" and "m" routines use the asm SqDistance and
TestPixel routines to provide superfast response!
* FLAW: computer controlled creatures can't shoot quite as far as human
controlled creatures due to the fact that humans are given an extra .5 on
their range while computer players are not. I have now rewritten the
range code such that all shooting ranges are calculated identically for
humans, computers and the "r" and "s" keys. NOW FIXED.
* When a creature is about to shoot, its actual .Range stat is printed at
the bottom of the screen.
* PROBLEM: When deciding which spell to cast, the really cool
auto-mouse-reporting feature that tells you what thing is under your
mouse pointer is deactivated. I've been wanting to keep this active
during spell selection forever. Now I finally did it! YAY!
* The "r" and "s" and "m" keys now work on whatever cell the mousepointer
is over at the time of the keypress!!! (Assuming there is no creature
currently highlighted.) YAHOO! Now we can easily inspect the ranges and
movement capabilities of any creature!!!!
* Now if you press SHIFT+r or SHIFT+s or SHIFT+m it displays the range info
for the creature under the mousepointer _even_ if you have already
clicked on a creature and that creature is highlighted by the sprite.
This allows you to go around graphically inspecting the ranges of
creatures right in the middle of moving one of your monsters!! Kewl!
* Put in some more code to support retargetable graphics.
* Implemented the new Highlighting method on Creations + Allies with
numeric keys.
* Partially optimized HandleMOUSEMOVE();
FLAW: The Hide spell is listed as a BONUS spell yet I keep getting them
in my startup spell list. I frequently start a game with 2 of these
spells showing. I'm leaving this for SAI to fix as I don't know anything
about the spell probability system.
Nov. 6th: sent complete archive to SAI so he can decide if he wants to make
a new version of the Chaos.font that is either 8 tall x 16 wide or 12x12 or
8 tall x 12 wide; thus allowing the font to be smoother, larger and
(hopefully) easier to read.
--- Changes made by SAI ---
* Fixed the bug pertaining to the Dao, Marid etc.
My monitor is being a real pain on a day when I was hoping to fix lots of
little things. It worked for long enough to be impressed with the s, r,
m keys new info panels etc. I like them all. Now switching to my old 11"
monochrome screen.
* Implemented flying pointer.
* Fixed Invert slowness.
* Fixed Hide spell showing up on spell lists inappropriately
(actually caused by Passage having rank 0 and prob 100)
* Gave Marid and Dao to more sensible probabilities.
* Added Edit option to first menu. It is just a stub at the moment
so that I can work on it while you work on the main game.
* Added code to support a classic option
- New global variable "classic"
- New gadget on second SetUp screen to select mode
- Changed io.tex to save "classic"
- Change program to reload spell probs for each new game
- Change Spell Manager to produce both chaos.prb and classic.prb
So far Faun is the only classic creature! I need to update the spell
files to show which are classic. NOW DONE.
* Fixed quickshot imagery
* Allowed reincarnation of creature even when mounted.
* Added new spells: Abath, Abduction, Acid Rain, Amphisbaena, Archery, Betrayal,
Thundermare, Iridium Horse, Chaos Lord, Devastation, Disection, Hidden Horror,
Mana Battery, Meddle, Necropotence, Points, Bipedal Generator.
I was amazed at how easy adding new spells is now. No more having to worry
about making sure I added all the appropriate pieces of information. All you
have to do is bang together a new spell file and change a couple of other
things. Once upon a time it would have taken a week to add this many new spells.
I've done it in four hours (I must admit I haven't tested them yet) and I
didn't yet complete the implementation of Necropotence. The new general combat
system is really cool for adding stuff as well.
JC you might want to check the descriptions of these new spells the are bound
to need tweaking. I haven't ad time to proof read them properly.
* Implemented the secret powerup Horse->Thundermare->Iridium.
* There was a bug in UpdateBoard that is not looking after wizard stats properly,
I discovered this after implementing the ChaosLord spell.
* Moved powerup display hard left on info screen. I now think this might better
go on the line under the name line. Needed to move it left because some wizards
ad so much stuff it was going off the right of the screen. Also had to move it
up slightly.
* Set the Classic flag for all the appropriate spells. Also changed the game
to start in "classic" mode by default.
* Allegedly fixed a problem that was causing the game to hang on Quit.
* Modified the I/O routines to save the entire probability table with a saved
game. NOW TESTED, all seems to work.
* Added tex2c.c to archive. Actually this is a tool I have used on lots
of projects and originally I had visions of making it a farily powerful
thing, but that never eventuated.
Doing one last rebuild to test and then sending archive.
SAI -- ReleaseS
JJC -- ObtainS Begin Version 2.0
* Played 1 small test game to get a Thundermare and an Iridium Horse.
Awesome!
* Made minor changes to most of the new spell descriptions: Abath, Abduction,
Acid Rain, Amphisbaena, Archery, Betrayal, Thundermare, Iridium Horse,
Chaos Lord, Devastation, Disection, Hidden Horror, Mana Battery, Meddle,
Necropotence, Points, Bipedal Generator.
Are independent creatures really attracted toward Mana Batteries?
My fave new spells are ThunderMare, Iridium Horse, Chaos Lord and Archery
(hey you stole my spell!). I rather liked many of the new spell
descriptions; one or 2 of them made me crack up laughing and most were just
plain interesting to read.
* 1 bug in DoComputerCast removed.
* I could find no evidence in the casting code of Depth removing LOS
requirements so I changed the description of Depth accordingly.
* For humans, Depth only worked on spells > ImpID yet for computer wizards
Depth just plain worked for everything. I adjusted it to be >ImpID for
everyone.
* DoComputerCast never checks the CAST_GROWTH bit. This explains why they
cast weird spells on growths. They were cheating!
* DoComputerCast never checks for the presence of an Arborist spell. Poor
guys. They could NEVER put 2 trees next to each other.
* That's a total of 4 discrepancies between DoCast and DoComputerCast. I
fixed all this by writing a new "Grand Unified Spellcasting Rules Function"
that DoCast and DoComputerCast and the "c" key all use to determine if a
postulated cell/spell/wizard combination would be legal or not. This
should help to eliminate lots of bugs in the future. From now on, all
spellcasting rules just go one place ObeySpellCastingRules. This ensures
that both computer wizards and human wizards and agents all follow the
exact same set of rules.
I noticed this line in the cast.tex:
HighLightCell = (WORD)cell; /* first to give some time to catch up */
btw if you ever want to make _sure_ that the sprite has caught up then you
can just do a WaitVblank(1);
I've never done that because I didn't want to slow down the game with a
bunch of Waits. And anyway now that I redid the sprite animation as a
vblank interrupt it is now IMPOSSIBLE for an ObtainSemaphore to stop the
sprite from being redrawn at the correct position for long periods of time.
So the maximum length of time to catch up is 1/50th of a second.
* c = casting. During the spellcasting phase you can press c and all the
legal targets for your spell are highlighted in the color cycling color.
This can be useful in the regular game as well as for testing the
spellcasting rules.
* q = query = question mark to bring up info screens.
Hey this is sort of cool, driving around the screen with the mouse in one
hand and the keyboard in the other. It is now very quick and easy to zip
around with the mouse and press q to see the info screens. q,s,r and c are
all on the left hand side of the keyboard. Only m is on the right hand
side, so your left hand can sit on the keyboard and your right hand on the
mouse. Maybe we should have a=m=move because a is on the left hand side of
the keyboard... but a should really be attack so I dunno...
* Added new subsection to the docs {Keys} Plus other small improvements.
*********************************************************************
Mini Level Editor Upgrade:
* ALT + d = Delete
* ALT + c = Copy
* ALT + p = Paste
* ALT + o = Object (This lets you pick any object from the game and place
it anywhere you like!)
This works with a hierarchical menu system which allows you to find
the creature you are looking for according to how you think of it.
Click the Orc to get a list of all ground creatures.
Click the dead Orc to get a list of all dead ground creatures.
Click the Orc scroll to get a list of all ground creature scrolls.
Click the Skeleton to get a list of all undead ground creatures.
Click the Skeleton Scroll to get a list all undead ground creature scrolls.
Click the Harpy to get a list of all flying creatures.
Click the dead Harpy to get a list all dead flying creatures.
Click the Harpy Scroll to get a list all all flying creature scrolls.
Click the Ghost to get a list of all Undead Flying creatures.
Click the Ghost Scroll for a list of all Undead Flying creature Scrolls.
Click the Wall for a list of all inanimate objects.
Click the Wall Scroll for a list of all inanimate object scrolls.
Click the GooeyBlob for a list of all Growths.
Click the GooeyBlob Scroll for a list of all Growth Scrolls.
Click the Horse for a list all Mounts and Meditations.
Click the Horse Scroll for a list all Mounts and Meditations Scrolls.
Click the Green Dragon for a list of all Level2 Mounts.
Click the Green Dragon Scroll for a list of all Level2 Mount Scrolls.
Click the Wood Elf for a list of all Archers.
Click the Wood Elf Scroll for a list of all Archer Scrolls.
Click the Bolter Wall for a list of all things that can shoot.
Click the Bolter Wall Scroll for a list of Scrolls for things that can shoot.
Click on the Armour for a list of all Magic Spells. ( > ExitID)
After you click on the actual object that you want then just click on the
board where you want it and *poof* it will appear there. It will also be
in your copybuffer so you can paste successive copies with ALT + p.
These keys require ALT for now so that people who aren't supposed to know
about them won't. Unfortunately, having to press 2 keys to do something is
not user friendly so we either need "Edit Mode" or gadgets that do the same
things as these keys.
These are very simple and don't have any special code for handling wizards
or the lists associated with list agents. Nevertheless it is possible to
edit levels with these commands. And since they are all #ifdef'ed they
take up about 0 bytes in the smake release.
* Lots of new predicates all #defined in predicate.tex which work with
object ID's instead of cells.
All new predicates are thus far used only in the level editor code:
isIDinanimate(id)
isIDgrowth(id)
isIDundead(id)
isIDflying(id)
isIDmount (id)
isIDdragon(id)
isIDarcher(id)
isIDshooter(id)
**********************************************************************
Azers don't heal even though they have a 2 recovery rate. I see you have
rewritten the recovery code so I'll just leave this for you to fix.
* Added the bar graphs of the recovery rates to the information panel.
* Columnarized the stats on the 2nd info screen so SAI will have room to
implement his "Creatures Killed" stuff. In my notes I called it
"Foes Vanquished"
* Weird graphic glitch: Clicking on the word combat causes a rectangular
black spot at the top of the screen where the title bar is supposed to be.
This partially overwrites the powerup icons.
I have determined that anytime you click the mouse into a window which is
not currently active that the lores screen gets this black spot but ONLY
when there is a nonbackdrop window in that area. The NewGame window has the
same problem when you click the mouse into the bottom of the screen (the
hires screen). Do you know of some way to disable the OS from redrawing the
TitleBar every time the user clicks a new window?
Are you getting this same glitch on your OS?
The only way I know to eliminate this problem is to just ALWAYS use the
backdrop window for everything. This is something I have been planning to
do for a long time anyway to save chipram.
As a quick and reliable fix (only works on the info screen) I have simply
activated the hires screen FIRST before anything gets drawn.
I also had to remove the autoACTIVATE bit from the newwindow structure.
This way when the user Clicks on Combat he isn't changing windows so the
titlebar doesn't get redrawn.
* Fixed that annoying problem where an independent creature could move next
to one of your creatures and attack it while the highlight sprite didn't
bother to highlight the creature in its new cell until AFTER the attack
was complete and even then it was instantly turned off. This was caused
by the complete lack of HighLighting code in cMoveNonEngaged. NOW FIXED.
The sprite now appears to keep up much better.
* BUG: SpellInformation(); on a WebAID, WebBID, WebCID, WebDID, VWallID,
HWallID, ExitID causes the game to NOT print the spell description for that
spell and it crashes the computer. I don't know how the compressed pooled
descriptions work or how HIDDEN spells are supposed to work so I just leave
this for you to fix. NOW FIXED
BUG: I have a bat with 0 life and -4 recovery but it isn't dying.
SAI: I failed to replicate this problems. I had an azer in the same situation
and it did die.
* BUG: The computer seems to think that player 2 and DEADP are on the same
team. It looked very strange when I pressed "2" and all the dead things
on the screen lit up in BLUE. NOW FIXED.
* YIPERS! Team[] was only big enough for the 8 players plus asleep.
Accessing Team[DEADP] was a bad subscript error. NOW FIXED.
* FLAW: ChaosLord did not set the FLYING_STAT bit of the wizard. NOW FIXED.
* Replaced 3 old slow codes in init.tex with faster GetCell(x,y).
**************************************************
********** MAJOR NEW GAMEPLAY MECHANIC ***********
********** SCROLLS ***********
**************************************************
Read the docs for a complete explanation of scrolls.
Scrolls add the following Play-Mechanics to the game:
1) The "Collect Things" Play-Mechanic.
Sometimes it is just plain fun to collect things and add them to your
colletion. This applies to both games and real life.
2) The "Limited Resources so you better get moving and grab them while you
can!" Play-Mechanic.
3) To some extent it adds the "Colonization" Play-Mechanic because you want
to hurry up and grab as many scrolls as you can early in the game
rather than just sitting in a tree meditating.
I have played many games where I initially hopped into a meditation and
then just cast powerups on myself to avoid confrontation. In the exact
same situation with Scrolls added I would have to rethink my strategy.
I might make a mad dash for an important spell and get drawn into a
fierce battle as a result.
btw: Scrolls make being player 7 or 8 more advantageous.
All in all Scrolls make a powerful additional option for an already superb
game. There are now some intriguing new ways to play the game. Like start
with 0 or 1 spells but 99 Scrolls with you against 3 enemy wizards and 1
generator. It makes the game take on a whole new flavor.
BTW: If we don't get the level editor fully functional for a while now it
is no big deal. You can just play the game with 99 Scrolls and between
those 99 spells + the 20 in your spell list you'll probably have the spells
you want to test available to you.
* There was something in the code whereby if you were obtaining a new
spell but your SpellTable up to the number of Spells you started with
was full then you didn't get your spell. I changed this by replacing
"Spells" with "MAX_SPELLS" in AddGUISpell so that way if you start the
game with 10 spells and cast 2 of them and then get 8 new spells you now
REALLY get them instead of most of them being "lost". I also changed
SpellTable to hold up to 150 spells instead of just 100. Even
though the largest number of spells that you can _start_out_with_ is 99.
* New Predicate isScroll(cell)
* New Function InsertScroll(cell)
* New Function InsertCorpse(cell)
**** Bug report + Fix *********************************************
* I was having a serious bug where scrolls with an ID > RevealID were being
inserted into cells. This caused enforcer hits and lots of crashes.
Here was the guilty code:
if (z==0) z=(MSGRandom() % (ExitID-1))+1;
else
z=(MSGRandom() % (RevealID-ExitID)) + ExitID+1;
It took me a while to figure this out... I looked at it several times and
my math seem to be ok yet IDs greater than RevealID were being generated
by this code.
The problem turned out to be that RevealID is not a simple number but a
"complex constant". It is a large mathematical expression, actually.
RevealID works out to CloakID + 1
CloakID works out to BuryID + 1
BuryID is MagicSheildID + 1
MagicShieldID is OrcsID + 1
ad nauseum
Rule: NEVER USE IDs in anything but simple expressions without
enclosing each ID in parenthesis.
This is one of the drawbacks to using #defined expressions instead of
variables.
FIXED BY: Enclosing RevealID and ExitID in parenthesis. (RevealID) (ExitID)
Maybe we should enclose all #defines in parenthesis in their definition?
SAI: The best solution would be to replace all the #defines by an
enumeration. It would probably lead to faster compilation. However, since
the Spell Manager now depends on the #define list several modifications
would be necessary.
JC: I think if we just enclose each #define in () that will suffice.
**** End Bug Report + Fix *********************************************
***************************************************
********* END OF SCROLLS UPGRADE ***********
***************************************************
Played a test game and teams work fine for the number keys but for
spellcasting they are totally screwed up. All the computer wizards were
casting spells on computer wizards who were not on their team and on human
wizards who were not on their team. I sure hope SAI can figure this out. NOW FIXED
----
ObtainS by SAI
Survived potential heart-attack seeing the archive named "encryptedchaos".
I have always (well not always, but for a long time) wanted something like
scrolls. Full points for actually having the guts to implement it. I can't
wait for it to compile so I can try it! I will also investigate your edit
functions and then try and amalgamate the two editing systems.
Have noted the above unsolved bug reports and will attempt to resolve them.
BUG: Press ALT-o part way through a previous ALT-o and I couldn't get
back to the game.
* BUG: Program lets you select growths to move. NOW FIXED.
BUG: New game followed by quit (sometimes) fails to terminate. I think this
occurs because if ObtainSemaphore has been done the Animator tasks fails
to terminate as expected. This suggests there is something wrong with how
the menu system is using ObtainSemaphore, but I have been unable to trace
this fault.
* Fixed MassMorph to not destroy bipedal generators.
* Made independent attract to Mana Battery.
* Fixed problem of info of spells without description.
* Made minor changes to game docs.
* Made a slight change to the testing of spells during scroll insertion.
* Identified the cause of the Team bug. It is a simple problem with the
spell manager writing assist.h.
* Added my editor into the source code, will try to amalgamate with JC
mini-editor code. Suggestion: to make it harder to accidently discover
ALT-o etc. suggest the user have to type ALT-! before these special
key-presses will work.
JC: I'm not even sure we should have those keypresses in the game at all.
I just DEFINITELY wanted something that I could use quickly to test things
with right then at that moment.
I just threw all that code together in 1 day because it just hit
me how I wanted to do it. It is a miracle that it worked. After I sent
you the archive I tested the editing stuff and was quite pleased that it
actually worked!!
* Started implementation of foes vanquished. Discovered this would mean
lots of changes to move.tex. To ensure I make these changes properly
I'm going to careful go through printouts of this module and also
cmove.tex. Some spell handler may also need to be changed, but I will
ignore that temporarily.
SUGGESTION: Have an option for scrolls where you cannot see in advance
what you scroll will be.
* Added Wizards variant of wizards and made changes in move.tex. This saved
28K.
* Modified editor to work with scrolls.
* Made minor modifications to InsertScroll.
* Put some common cell manipulation routines in a new module core.tex.
Reinstate, Insert*, PutToSleep, ClearUnder, WakeUp.
* Moved WizardExplode effect into cell.tex.
* Added an isGenerator predicate.
* Added scrolls docs to user docs. Didn't do it very well however.
* Combined the JC mini-editor commands (except ALT-o) with my editor.
x is a synonym for d, v is a synonym for p. The the three keys
"XCV" now do cut, copy, paste as is typical in many applications.
In the mini-editor ALT must be pressed, in the general editor ALT
is unnecessary. These key presses still have major flaws when applied
to wizards, but they are a good start.
* Modified InsertCorpse to insert a nothing when passed an argument not
having a dead image. This makes sense, and is now necessary since
InsertCorpse is now called from several places.
* BUG: I have now comfirmed that TestPixel does not seem to work properly
in Spunge. I replaced TestPixel with ReadPixel and the problem went away.
Earlier explanation: The graphic effect used with Dark Power no longer seems to work properly
only works for the lowest 4 bits of each cell. NOW FIXED
* Fixed Abduction and Raise Dead (for some reason Raise Dead was leaving the
corpse underneath). Actually I think that means the corpse was already
there which means there is something else wrong as well.
* Vanquished foes now working including saving of this information. However, I
am not at all convinced that memory is been released properly in all cases
when an object dies, e.g. when a creature falls in a pit. Also when a spell
like Replicate is used, this replicates the vanquished list for that creature
as well (not quite, both creatures end up using the same list--since this is
rather neat I haven't changed it).
* Implemented a bomb explosion effect. It is now used for Nuke and the Goblin
Bomb.
* Fixed the recovery rate code. I did however notice a python that refused to
died (this may be related to the pox or maybe it had been powered up in some
way, I'm not worrying about it unless I see it again).
* Removed another bug from io.tex (a bad bug).
QUERY: Should scrolls be generated according to their probabilities.
Current all spells are equally likely under scrolls and hence powerful
spells are relatively common. I'm not saying this is bad, but is it
what you intended?
Well, it is what I intended for the moment. I just wanted to try something
different. Since I had only played the game with 2 sets of probabilities
(regular and classic) I thought I'd try yet another set of probabilities
just to see how it worked out. I played some test games and it seemed ok
the way it is as long as you play with a small number of scrolls, say
20 or less. But with 99 scrolls there are multiple Touch of God and
Iridium Horse scrolls laying around which I didn't think was the best
thing, however I have a nifty fix for this which I will hopefully implement
this week. Then we can playtest it some more and make a final decision
on the scroll-probability system later. I have many things to do with
the scrolls concept this week.
--- End SAI changes ---
--- JJC ObtainSemaphore --- Begin Version 2.1
************** BEGIN tex2c speed upgrade ****************
* Installed new tex2c.c into the archive. Be sure to compile it
according to the instructions contained in the source.
Or hopefully I'll just Email it to you if I can.
Be sure to replace the old version with the new one in your command
path or you won't benefit from the speed increase.
tex2c: Filesize reduced from 12672 -> 9768 bytes.
tex2c: Speed increase on prog.tex: 35x faster (from RAM:)
tex2c: Time savings on prog.tex: 67 seconds. (From HardDrive)
tex2c: Time savings on complete make: 317 seconds (5 minutes, 17 seconds)
(From HardDrive)
All times were measured on Chaos_2.0 source files.
tex2c: Now works as tex2c filename rather than tex2c <filename.
tex2c: All output files are identical with the old tex2c.
tex2c: No assembly language used in order to help preserve
multiplatform compatability.
tex2c: Read source code for more detailed timing tests and exact
description of changes made.
************* END tex2c speed upgrade *******************
* Replaced code segments with ClearUnder in 4 spell files.
* Replaced several code segments in .tex files with ClearUnder.
* All appropriate code segments have been replaced with ClearUnder now.
* Ok, now I did "smake newspell" and the filesize INCREASED from
1552980 to 1628116!!!!! There must be some difference between smake dev
and smake newspell.
* Replaced all appropriate code sequences with ClearVisbile
* I could not find any code sequences to replace with RestoreCell.
* Replaced all appropriate code sequences with BackUp.
* Above replacements were made to enhance readability and to make future
enhancements easier. Some future strange enhancemnt to the cell
structure can now be integrated into the game by just changing the
routines in core.tex. (theoretically).
* BUG: Wizard kills some creatures. Wizard mounts something. Mount dies
permanently. Wizard's vanquished foes info not copied into
cell.vanquished. FIXED by replacing a code sequence with
RestoreCellWizard in Reinstate.
* BUG: same as above but with collapsing meditations. FIXED by inserting
RestoreCellWizard into CollapseMeditation.
* BUG: Collapsing mediations does RestoreCellWizard on the wrong wizard,
with disasterous consequences. (another off by 1 error). FIXED.
* All appropriate code sequences replaced with RestoreCellWizard.
* I could not find any code sequences to replace with BackUpCellWizard.
* Inserted version information compatible with the AmigaDOS version command.
* Fixed the smake archive to archive the time and datestamp of the files.
This way I can cd to the graphics or spells directory and type:
list since friday
to see all the files that have been changed since last friday.
Or I can do:
list since 25-nov-97
to see all the files that you have added/changed since November 25th.
* Fixed the bug with pressing alt-o while already in the alt-o menu.
**************************************************************************
************************ ARTIFACTS UPGRADE *******************************
**************************************************************************
* Read the docs for complete instructions on Artifacts.
* New function: InsertArtifact.
* New predicate: isArtifact.
* New predicate: isUnderArtifact.
* New predicate: isUnderScroll.
* New predicate: isIDstatic.
* Artifacts added to alt-o level editor.
* Hidden Artifacts implemented.
* Now that I have implemented hidden artifacts and scrolls I find that I
cannot attack objects that belong to NOBODY. I'm not fixing this right
away so that I can play the game like this for a while and see what it is
like. The game does let me shoot objects belonging to NOBODY though.
NOW FIXED.
* Made numerous changes to Reinstate so that killing any object that is
covering a scroll or artifact does NOT destroy the scroll/artifact.
This mainly consisted of replacing InsertCreature/ClearUnder sequences
with RestoreCell/InsertCreature sequences. btw: I REALLY like the new
reinstate routine it is sooo much easier to understand than the old one!
* Also had to make changes to InsertCorpse to not destroy scrolls and
artifacts.
* New functions to support the above 2 items: InsertCreatureUnder and
InsertCorpseUnder.
In general, if a creature dies while on top of a scroll then the corpse
for the creature goes to the underpart and the scroll goes to the top part.
If an inanimate object dies which is covering a scroll or artifact then
the scroll/artifact is no longer destroyed but instead goes to the visible
part of the cell.
* Hidden scrolls and artifacts are now fully supported by core.tex.
You can now "dig up" buried scrolls and artifacts.
You can now have wars over a particular scroll, with one creature
moving onto the cell and being killed by another creature who is then
killed by yet another, ad infinitum and the scroll won't be destroyed.
* Made 2 fixes to move.tex to prevent Thundermare and Iridium
transformations from destroying scrolls underfoot.
* Set CAST_ARTIFACT on all appropriate magic spell files. At the moment
CAST_ARTIFACT is set only on spells that have CAST_LIVING set. All
spells which have CAST_LIVING set also have CAST_ARTIFACT set.
This way artifact creatures are treated just like any other creature
for purposes of spell-casting.
* Please don't forget to set CAST_ARTIFACT on any new magic spells that you
make (if needed). Most every spell that can be cast on creatures should
be castable on Artifacts also. (since artifacts are just a special type
of creature, like undeads are a special type of creature.)
As I was going through the spell files I noticed that Orcs is CAST_FREE?
And when you actually cast an Orcs spell it says at the bottom that the
range is 0 but in fact it is 1.
I added Artifacts to the game for the following primary reasons:
1) It adds the "Capturing Neutral Equipment" play-mechanic to the game.
2) It adds the "Capturing Enemy Installations" play-mechanic to the game.
3) Provides extra incentive to players to hold a particular position, as
opposed to hiding in the corner.
How good artifact gameplay actually is in real games will have to be
determined by playtesting. Although I note that when I added scrolls I
began doing crazy things that I wouldn't have otherwise done, such as
charging my wizard TOWARDS powerful enemy creatures (instead of AWAY as
usual) in order to grab a good scroll before they could get it.
**************************************************************************
********************** END ARTIFACTS UPGRADE *****************************
**************************************************************************
I just started up a test game to test all the new features and I started
out the game with a THUNDERMARE in my spell list.
A bipedal generator just generated a Brown Bear. But bears are quadrupeds
not bipeds. Shouldn't this be fixed?
Hmmm... Now I am playing a game with 4 generators... 2 of them are bipedal
generators. Bipedal Generator1 produced this sequence of monsters:
Derro, Derro, Bear, Bear.
Bipedal Generator2 produced this sequence of monsters: Halfling, Halfling,
Halfling, Halfling
*************** Scrolls Improvement Upgrade ****************
* Hidden Scrolls implemented.
* Inanimate objects can no longer pick up scrolls.
* Fixed spiders to use the InsertCreatureUnder function when laying webs.
* Changed spider description to say that it eats scrolls. (since the
act of laying a web destroys any scroll that may have been underneath it.)
* REMOVED the ChooseYourBonusSpell option from the setup screen II and just
set it to always be on. IMHO having it off is no fun so it should just
always be on. (and we've completely run out of room on setup screen II).
* Scroll delay implemented. So now it is _very_ possible to have wars over
scrolls. You can set the scroll delay to 3 turns and then you must take
the cell and HOLD it for 3 turns straight. If someone dislodges you from
the cell before 3 turns is up then you don't get the scroll and must retake
it and start over.
BUG: Ropers destroy whatever they are standing on when teleporting.
(corpses/scrolls/artifacts) Oops no it doesn't. When the roper teleports
it takes whatever it is standing on with it. Interesting.
* BUGS: Roper scrolls teleport, growth scrolls alter growth rates, Spider
scrolls lay webs, Haunt scrolls change sides, meditation scrolls
collapse, spriggan scrolls "take a kip". ALL FIXED NOW.
These bugs wouldn't have happened if scrolls were "dead". But perhaps
setting the deadbit on scrolls would cause other bugs? Who knows?
For now I have simply added an isScroll check to wherever I find bugs
related to scrolls. It is easy and it works.
************** End Scrolls Improvement Upgrade **************
* Replaced a couple of the old wizards[] references with Wizards[] in
core.tex.
* Replaced a couple of the old wizards[] references with Wizards[] in
cell.tex.
* Replaced several of the old wizards[] references with Wizards[] in
warp.tex.
* Replaced all wizards[] with Wizards[] in init.tex.
* core.tex, cell.tex, warp.tex, init.tex are now completely free of old
wizards[] references.
* Replaced all (except 1) of the old wizards[] references in predicate.tex.
* Replaced 2 of the old wizards[] references with Wizards[] in prog.tex.
***********************************************************************
********** Artificial Intelligence Spell Selection Upgrade ************
***********************************************************************
* I am seriously looking at spell.tex for the very first time.
* Improved computer spell selection by using ObeySpellCastingRules.
This should completely eliminate all the really stupid casts where the
wizard tries to cast an impossible spell due to there not being any legal
targets. (Such as casting Raise Dead when there are NO corpses in range.)
* BUGS: Computer wizards were cheating! They were going through their
ENTIRE spell list and casting any spell they wanted! And they were going
through their entire spell list and discarding any spell they wanted!
NOW FIXED BY changing max to min in the following line in
IntelligentComputerSpellSelect and ComputerSpellDiscard.
int look = max (LOOKAHEAD, Spells);
* ObeySpellCastingRules is now more sensibly known as isIllegalCast.
* New function: isStupidCast.
* Improved computer spell selection by using isStupidCast along with
isIllegalCast. Now if a wizard contemplates casting combat but his only
legal targets are enemy creatures or his own combat aerial servant he
will simply decide that casting combat in this situation would be stupid
and will cast something else instead.
* ADDED lots of extra checks for spells to probably not cast while double
or triple is in effect.
* ADDED complete stupidity checking regarding multiple wizard powerups.
* Having a working game load/save feature really helped me debug the AI the
last few days. Thanks Sean!
* FLAW: A computer wizard was in a tree. There were several legal targets
for the slow spell that he cast but unfortunately, all the targets were
already speed 1 so the spell was really wasted. NOW FIXED.
* SMALL FLAW: A computer wizard in a Dark Citadel just cast Speed on his
Floating Eye. I'm sure he had at least a few other spells that would
have been better. NOW FIXED.
* FLAW: A computer wizard cast Sanctuary on himself even though he
already had Recover Boost. (He had no creatures on the board). He
should have cast any one of a number of other better spells. NOW FIXED.
* Numerous other flawed spell selections fixed using the same method as
above. This new "look before you cast" strategy is really working out
nicely! The only strategy game that might be better than Chaos is
Chaos Coding.
If you notice a computer wizard casting a spell and then aborting it due to
no legal/nonstupid targets then please let me know. (or just fix it). It
should NEVER happen unless the creature he was planning to cast it on gets
killed before his casting phase. Or if his line of sight becomes blocked
(for example by another wizard casting lots of walls between him and the
intendend target.)
***********************************************************************
******* END Artificial Intelligence Spell Selection Upgrade ***********
***********************************************************************
BUG: I just surrounded a computer wizard with weak walls.
(He had already selected Lightning as his spell). When it became his
turn to cast he cast it on one of my weak walls. The
wall then had 83 life points. Please fix. Fixed by SAI.
***********************************************************************
*********************** Music System Upgrade **************************
***********************************************************************
* After ages of hacking and slashing music asm code I am now ready to
integrate the new music playback system into Chaos.
* Downloaded and installed util/pack/xpk_Develop.lha so I can assemble
player.asm -> player.o
New music system supports compressed music IF you have xpk libraries
installed; otherwise it doesn't. xpk libraries NOT required. It is
just an extra added option for someone who wants to replace the game
music with their own (compressed) music. Or perhaps we will use
compressed music at some point. Who knows?
Here is what I did with xpk:
Put the archive into t:
lha x #?
cd t:xpk_develop/include/c
copy all to include: clone
cd t:xpk_develop/include/asm
copy all to include: clone
cd t:xpk_develop/autodocs
copy all to include:autodocs clone
I didn't know where else to put the autodocs...
I have no particular plans for using xpk from C but you never can tell what
the future will hold so I installed the C files for completeness.
* Commented out EVERYTHING to do with the awful ptreplay.library.
* Music.lib
In preparation of the new music system I have joined 27 files into 1
music.lib file which contains all the asm code related to the new music
system. (12 .asm files, 12 .o files and 3 .i files.) All those files must
reside in INCLUDE: in order to assemble correctly and since I don't feel
like reading the instructions to figure out how to make them assemble from
any directory it is just easier to assemble them like that and then whack
them all into one big 32k music.lib which can be easily included in the
archive.
* Chaos is currently 1100836 bytes. After linking with the new music
system it is now 1100836 bytes! Either slink is much better or much
worse than I thought it was! I just linked with the 32k music.lib and
either slink didn't do it or it noticed that there are are NO calls to
any functions in the .lib file currently so it intentionally didn't
include it. Yes that must be it.
* In a frantic attempt to get ciab.resource to open (it always failed) I
commented out all the timing code from Chaos. Still didn't work. Ok,
now I figured it out. A damn misplaced semicolon...
Ok I just tried to link in the music.lib while actually referencing 1
variable from music.lib and I just got TONS of undefined variable errors.
Looks like I must do a LOT more hacking and slashing.
Ok I've reduced it from 46 errors to 25. This is the first time it has
actually compiled into a file:
1099680 -> 1125768 bytes so it seems to have only added 26k. WOW, if
that value holds then that is EXCELLENT! Much better than the 40k I
thought it was going to be!
Details of what I did to force the new music system into Chaos appear in
the file INCLUDE:errorlistmusic. (2.6k) and more info is in the asm
source player.asm
* WOOHOO! Successfull linkage of music.lib with Chaos achieved on
Sunday, December 14th, 1997. That was just to get it all linked
together. I haven't put any code in Chaos to actually call any of the
routines in music.lib yet so there is still much to do.
* ROUTINES in music.lib:
*** setsong - Start playing a different song in the current module
* d0 = Song number to start playing
*** loadmod - Load a module without playing it
* a0 = Pointer to filename
* Returns: d0 = Null if successful, pointer to error message if failed
*** playmod - Play an already-loaded module
* d0 = Song number (-1 = user's choice)
* Returns: d0 = Null if successful, pointer to error message if failed
*** startmod - Load a module and start it playing
* a0 = Pointer to filename
* d0 = Song number (-1 = user's choice)
* Returns: d0 = Null if successful, pointer to error message if failed
*** contmod - Continue a module from where it left off
* Returns: d0 = Null if successful, error message if failed
*** contplaymod - Continue current module if possible, otherwise restart it
* Returns: d0 = Null if successful, error message if failed
*** stopmod - Stop a playing module
* Returns: d0 = NULL
*** endmod - Stop and unload a module
* Returns: d0 = NULL
There are other routines for changing playback speed and volume but I
haven't worked out how to use them yet.
So all we need for the intro music is
startmod("filename",0);
// blah blah blah
endmod();
YAY! IT REALLY WORKS!!!
2 small problems though:
1) The current sound effects system opens up and
hogs 1 audio channel throughout the entire game. If it does this while
the music is playing then it messes up the music. I worked around this
by moving the code that opens the audio.device and hogs the channel so
that it is no longer in CommenceChaos but rather right at the end of the
setupscreens.
2) It is incompatible with Say(); calling Say while
music is playing screws up the timing of the music and makes it sound
awful. However, playing a sampled sound during the music does WORK
PERFECTLY! So we must either:
A) Not play music while using Say();
B) Not use Say(); while playing music.
C) Make some sort of workaround for Say(); However I have no idea how
to approach the idea of making a workaround. I guess Say messes up
the CIA timing registers? Perhaps the AmigaSpeech just plain isn't
truly system friendly? Who knows?
For now I will comment out the line that says "Welcome to the Magic Zone"
so that the music can play during the setup screens. It will be a simple
matter to replace this Say(); with an actual sampled sound file. (Something
I've been planning to do for months anyway).
Actually it could be WaitForSay(); that causes the incompatability for
all I know.
* 218K of asm source code was used to produce music.lib.
Now that the new music system is _finally_ in and working:
* ADVANTAGES of new music system vs. ptreplay.library.
1. It actually works.
2. It works on MC68000 processors unlike ptreplay.library.
3. It can play SoundTracker/NoiseTracker/MutantTracker/ProTracker music
without messing them up like ptreplay.library did.
4. Also supports 8-channel Oktalyzer music. (untested at this time)
ptreplay.library has no 8-channel support.
5. It has a rudimentary IFF 8SVX sound sample play routine also.
6. It was originally written by my good buddy Bryan Ford the MEGACODER.
7. It is very easy to add med/octamed support should we decide to do so.
8. It is very easy to add support for a BUNCH of other music formats but
those other formats are all irrelevant AFAIK.
9. MOST IMPORTANTLY: It _shares_ the sound channels in a system friendly
manner!!! Something that _NO_ other replay routine does!!! (That I
know of or could find any evidence of or have even heard of.)
Sharing the sound channels _may_ be desirable in the general game so
that music can be playing while the sound effects are playing too.
However this may sound too jarring with multiple sound effects being
played. Only experimentation will tell.
Sharing the sound channels _IS_ _DEFINITELY_ required for a truly
system friendly and multitasking game. If the player routine doesn't
share the channels then the AmigaOS DisplayBeep(); function CANNOT
make any sound! This is unacceptable IMHO. Especially when you are
sorting your database or copying a disk or browsing the web while
the game music is going on.
I investigated many, many replay routines and NONE of them shared the
sound channels. They all just hogged all 4 channels and wouldn't let
any other sounds get through no matter how important the sound was!
* DISADVANTAGES of new music system vs. ptreplay.library.
1. Takes 26k instead of only 10k.
2. It might be a LOT slower. I just don't know. We need to somehow test
its speed by running a program and timing it then running the same
program again with the music going and see if there is a speed
difference.
3. It isn't a shared library so it can't be flushed out in a low memory
situation.
4. It doesn't have volume fade in/out because I haven't got around to
implementing that yet. This isn't really a disadvantage though since
the volume fade in/out of ptreplay.library caused crashes anyway.
* DELETED all code related to ptreplay.library.
* In the future I might remove the 8-channel music support if we don't end
up using my 8-channel music or if the 8-channel playback doesn't work 100%
That would save several K.
* In the future I might add volume fading in/out.
* All in all, Chaos now has a better music playback system than any other
Amiga game. Most games have an option for music OR sound effects but
Chaos can have BOTH if we so desire.
* AAAUUUUGGHH!!!! I just did a DisplayBeep during the music and the music
PERMANENTLY lost a sound channel!! It also caused some other glitches in
the music playback. I don't understand this. I can play sampled sounds
all day long from the CLI and everything works perfectly... I don't know
why this music system is not cooperating with DisplayBeep and Say.
Ok, I changed my preferences: I changed the sound type from "beep" to
"sound sample" now the display beep makes NO noise and doesn't steal a
channel. !?!?! For "beep" to make a sound and "sound sample" to not
make a sound in DisplayBeep means that there must be a bug in the OS.
This whole situation also means that there must be some secret coding
technique that is used in the way I play my sound samples from the CLI
that allows it to borrow a sound channel, use it and then give it back
without causing any damage. This will all require a lot more
investigation.
***********************************************************************
******************** END Music System Upgrade *************************
***********************************************************************
BUG? I was playing a nice little game... I had surrounded a bipedal
generator except for 1 cell. I just cast a faun into that cell. Then it
said "Banderlog sleep" and my Red Dragon was put to sleep and instantly
collapsed! ARGH! There are no banderlog's on the screen! Could my Faun
have cast sleep on my own creature?
The exact same thing just happened again! This time my gorilla got put to
sleep! I think maybe I am casting creatures onto a dead banderlog.
Now I'm in a completely different situation and my Faun just put my harpy
to sleep. This faun has killed more of my creatures than the enemy has.
Now my other faun on the other side of the board put my manticore to sleep.
I guess Fauns just cast their sleep spell on anybody...
Now my faun put my Crocodile to sleep.
I had always intended that you press the "c" / "r" / "s" / "m" keys ONCE
and the color cycling would take care of the flashing for you. But I just
now accidentally held the "c" key down for a while and it started flashing
completely on/off in an almost acceptable manner.
***********************************************************************
**************** Efficiency Upgrade Speed/Memory **********************
***********************************************************************
********************** Part 1 ****************************
********************** __near data upgrade ****************************
* SOLUTION to near/far data problem. There is no problem! The compiler
defaults to always using FAR data. But this is easily overridden by
using the __near keyword on any varibles that we want to keep in the near
64k dataspace. Keep in mind that some vars are accessed in the asm code
as FAR so we have to leave those as FAR (or add the __near keyword AND
edit the asm code). So if you ever have a variable that gets used a lot
then feel free to use the __near keyword on it.
* As a test I will just make board be a __near variable.
1126496 -> 1123868 Cool! Saved 2628 bytes! This savings should
translate at a 3:1 ratio so that's about 876 bytes saved on smake
release. Don't forget __near variables are faster too.
* More C lameness: I just moved a bunch of variables from far to near in
prog.tex. I only recompiled prog.tex and start.tex to quickly eliminate
the simple errors. Yet it compiled and linked perfectly!!! Even though
there were TONS of far references to variables that were now defined and
initialized as being in the __near data section! I couldn't believe my
eyes! I knew there was NO way such a program could possibly run but I
wanted to prove it so I ran this newly compiled Chaos and sure enough
*BOOM*. Up came the requester: "Software failure: Suspend or Reboot".
* After switching over all appropriate variables in prog.tex from far to
near: The filesize is now 1113932 for a total savings of 12564 bytes.
* Ok, I rummaged around through all the other .tex files and transferred
over a few variables here and there to __near. Even changed vp in the
C and asm code to be near. Filesize is now
1112396 325868
* Changed vp to be near (in asm code too). DID NOT WORK no matter what I
did. 8(
* __near vs. __far
4 6 Bytes of code required to access the variable.
12 16 Cycles required to access byte or word variable on 68000.
16 20 Cycles required to access long variable on 68000.
move.l var(a4),d0 Asm near var.
move.l var,d0 Asm far var.
GRAND TOTAL SAVINGS: 14100 bytes.
******************* END __near data upgrade ***************************
********************** Part 2 ****************************
********************** Macros Upgrade ****************************
int t3=board[c].char_stat.Stat; Produces the following asm code:
move.l d4,d0 ; 4 cycles
asl.l #2,d0 ; 12 cycles
sub.l d4,d0 ; 6 cycles
asl.l #2,d0 ; 12 cycles
sub.l d4,d0 ; 6 cycles
asl.l #3,d0 ; 14 cycles
movea.l a0,a1 ; 4 cycles
adda.l d0,a1 ; 6 cycles
move.l 0014(a1),0018(a7) ; 28 cycles
GRAND TOTAL CYCLES: ; 92 cycles
GRAND TOTAL BYTES : ; 22 bytes
The above code is actually much smaller and faster than I expected.
Now look at the code generated by:
int t4=cell->char_stat.Stat;
move.l 0014(a5),0014(a7) ; 28 cycles. 3.28x faster than above!
; 6 bytes.
So we can basically save 16 bytes and 64 cycles each time we use a new
IsUndead(cell) macro instead of an old isUndead(cell) macro.
* NEW PROGRAMMING RULE: macros which start with a lowercase letter
(isUndead) require a numerical parameter while macros that start with an
uppercase letter (IsUndead) require a pointer to a playCell structure.
* Changed: AttacksLiving into attacksLiving and AttacksUndead into
attacksUndead.
* All "is" macros now also have an "Is" form in predicate.tex.
At the beginning of this project the size of Chaos is:
1112396 / 325868 bytes.
* CHANGED isFlying from a function into a macro.
1112208 / 325844 Saved 24 bytes.
* Made "Is" versions of "is" functions in predicate.tex plus optimized the
"is" functions.
1112572 / 325904 Lost 60 bytes but saved 64/128 cycles here and there.
* Edited spell.tex:
1112620 / 325804 Saved 100 bytes.
* Edited cast.tex:
1112568 / 325664 Saved 140 bytes in isIllegalCast
1112020 / 325004 Saved 660 bytes in isStupidCast
1111888 / 324800 Saved 204 bytes in DoComputerCast
1111832 / 324672 Saved 128 bytes in Drainer
1111796 / 324560 Saved 112 bytes in PlasmaBeamHandler
1111804 / 324536 Saved 24 bytes in Multiplicity
1111728 / 324432 Saved 104 bytes in CastSpells
1111732 / 324432 Saved 000 bytes in PossibleChoice ???
1111716 / 324400 Saved 32 bytes in Generate
TOTAL SAVED cast.tex 1404 bytes.
* "c" key is faster now that spell.tex and cast.tex have been optimized.
* Edited cell.tex (ReDrawCell + AutoAccept)
1111684 / 324288 Saved 112 bytes.
* Edited prog.tex:
1111588 / 323316 Saved 972 bytes by removing AnColBackup and AnRowBackup.
1111088 / 322828 Saved 488 bytes in Animator.
1110600 / 322444 Saved 384 bytes in HandleIDCMP.
1110608 / 322428 Saved 16 bytes in HandleMOUSEMOVE.
1110556 / 322352 Saved 76 bytes in GetSpellSelection1.
1110076 / 321924 Saved 428 bytes in BoardUpdate.
1109988 / 321816 Saved 108 bytes in CalculateArtifactOwners.
1109900 / 321712 Saved 104 bytes in PickUpScrolls.
1109908 / 321704 Saved 8 bytes in main.
TOTAL SAVED prog.tex 2584 bytes.
* Edited info.tex:
1109592 / 321320 Saved 384 bytes in ExtraDisplay.
1108544 / 320380 Saved 940 bytes in InformationPanel1.
TOTAL SAVED info.tex 1324 bytes.
Running out of time. SI needs new archive by Dec. 22nd so the "Efficiency
Upgrade" is being placed on hold for now.
****** TEMP END of Efficiency Upgrade Speed/Memory ***************
* Absorbed flashywin.c into Chaos. Only added about 400 bytes to the
executable release.
* Quadrascope and Spectrogram added to the setup screens to go along with
the music.
After some hacking and slashing and rearranging I got everything to work
and be compatible with the quadrascope and spectrogram. I had to make
some adjustments to the GameGadgets code and rearrange some things and
add some lines of code here and there.
* #define CheckPixelArrays(blah) Saved about 1000 bytes.
* Set nasty_audio for the music player to prevent displaybeep from
permanently stealing a channel when you overflow a text entry gadget.
* BUG: When a creature is engaged it can still "attack" an empty cell and
move onto it. NOW FIXED for human players. This bug may still exist
for computer players.
BUGS: load and quit don't work on setup screen I. No time to fix.
I don't really know how to fix them quickly because part of the problem is
adding gadgets that are already there or removing gadgets that are not
there. I don't know much about gadgets so I won't muck about with this
now. Just remember that the GameGadgets need to NOT be attached to window
during the setup screens but they DO need to be attached to the window
during the entire rest of the game.
* I made a smake release and tested it on my A2000 and disabled the chipram
down to 512k to see if it would work. IT DID!!! AMIGA RULES!!!
On a 1 meg Amiga with 512k chipram and 512 fastram here is the memory
availability when the game is autobooted from a minimal boot disk with NO
unneccessary stuff loaded and making use of the wonderful Add36k command.
This is while running chaos with a standard stack of 4096 bytes.
I wouldn't recommend using a stack bigger than 8000.
btw: The disk is 94% full.
Time: Chipram Available: Fastram Available:
Intro 47496 55920
Setup 56376 111592
Game 205304 111320 (Examined while "about" screen was up.
Game 256104 111320 (Just looking at the board.)
The numbers for the Intro and Setup seem dangerously low to me. It would
only take *1* piece of fragmentation to cause them to fail. Indeed, it
seems like a miracle that it is working. Maybe its a Christmas Miracle?
I just can't imagine any W95 program running with only 55k of free ram
and not crashing after 5 minutes or so.
I noticed that the whole game sounds different on the slower 7Mhz 68000.
The lineofsight routine is still too slow on 7Mhz 68000 as can be seen
by the delay in pressing the "c" key when trying to cast something with
long range that requires line of sight. (Like trees or castles).
Oh well, nothing can be done about that.
Sending an archive to SAI on Sunday December 21, 1997 for testing during
Christmas holidays. Also sending an archive of my autobooting floppydisk
version for OS1.3 Amigas.
-------------------
* Adjusted alignment of scopes to allow them to run a bit faster.
Saves 64 chipram reads and 64 chipram writes per frame drawn per scope.
* Rewrote the quadrascopes to run at 3x the framerate that they were running
previously. They now run at MAXIMUM speed (50 fps). Quadrascopes are
now much more "electric".
* Rewrote the spectrogram to run at 3x the framerate that it was running
previously. It now runs at MAXIMUM speed (50 fps). Also rewrote the
\decspec routine in flash.asm to be much faster. The spectrogram now
descends much more smoothly. (1 pixel per frame instead of 3 pixels at
once every 3rd frame.)
* Implemented a new jcspectrogram. It is a new version of the above
spectrogram but this one has colors and is faster too. I left the old
spectrogram intact in music.lib in case we want to use it in the future
for some reason.
* Rewrote intflashnote in misca.asm to be faster and take less memory.
* Commented out most of the unused variables from misca.asm. SAVED 1808
bytes on the music.lib filesize.
* Rewrote part of the Quadrascope to save 66,800 cycles per second on A500.
Christmas Eve playtesting with Joseph:
* BUG: Artifact ties were being awarded to the higher player number rather
than to NOBODY. NOW FIXED.
My brothers had not playtested Chaos in months. They had completely lost
interest in the game. Joseph even explicitly said that "I just don't have
the attention span required to play Chaos." I thought that they would
never play it again... 8(
But I got Joseph to notice the game when he came into the room while I was
working on the speeded up Quadrascope so we got to talking about the new
features and within an hour of playing he was telling Jerry he should start
playing the game again because the "The game is really groovy now."
Joe and I played 2 games with about 20 hidden artifacts + 20 hidden scrolls
each. The first game we had only 20 spells and the next one we had 40 spells.
We had 3 or 4 generators and a few computer players against us. The game
had a whole different flavor as we went around mining for spells and
learning how to use artifacts. We played where only wizards could pick up
spells. I liked that a lot.
JJ and I played 2 games with 99 spells, Texas Trash'em, 20 UNhidden scrolls
and 20 UNhidden artifacts. I was near death from turn 1 due to being near
too many enemy artifacts and generators but luckily I cast a Reflector
which set me up in a good safe position. The game would have probably
lasted a very long time but JJ made a fatal mistake. He took control of a
Damaged Dalek Artifact and shot my wizard (thinking he would kill me).
Of course the FULL brunt of the impact reflected back on the Dalek and it
died. So there was this dead dalek just laying there so I cast Raise Dead
on it and started chasing after his Wizard and killed him. Game over man.
The next game was INCREDIBLY interesting... The top 2 corners had simply
too many Computer Wizards and generators to venture near. That left the
bottom right corner which was quite safe and quite devoid of usefull
scrolls and artifacts. And the bottom left corner which had a Range Boost
Scroll and a Double Scroll and 2 Bolter Wall artifacts with NO generators
or enemy wizards nearby.
First turn:
I cast a pegasus so I could get over to the corner ASAP. That
was my fastest creature. I didn't have a teleport.
JJ cast Teleport and was IMMEDIATELY in a GREAT position in the bottom left
corner.
I dediced "Damn the bolter walls! Full speed ahead.
Turn 2: I get shot by the bolter wall which JJ now controls but I
psychotically decide not to retreat.
Turn 3: I move my pegasus as close to the botom left corner as possible.
Which is still 2 squares away from the bolter wall. I get shot by the
bolter wall again AND some other guy's dragon breathes on me and kills my
Pegasus. So my wizard is just standing there exposed.
Turn 4: I cast a creature next to the bolter wall and made it back to being
nobody's.
I don't remember the exact way things happened from there on out but all I
know is that each individual turn I was in SEVERE danger of dying. I had
to cast the EXACT right spell in the exact right way to survive. It was an
enormous power struggle for control of that corner. Each turn I ALMOST got
the upper hand and became powerful but each turn my plans were thwarted by
JJ. At one point I had my wizard and elephant next to the bolter wall so it
was GOING to become mine after we cast spells. This means I was going to
win (bolter wall hit plus elephant hit on his wizard = death) But then he
gave up fighting for the artifact and cast brain drain on it. I was sorely
tempted to cast Raise Dead on it but *I* was also about to die immediately
so I couldn't.
He cast a lion to go around my elephant and eat my wizard so I HAD to
cast sleep on the lion right that turn. Problem solved, except that he
cast FREE on my elephant!!!! ARGH!!!! Then he woke up his Lion!!! I had
just finally cast cloak but after all the attacks that round even with my
cloak I was down to 2 points of life. So I had to retreat back to the
middle of the board which was basically empty except for a bolter wall
artifact and a dalek artifact. Once I quit psychotically trying to attack
that corner I became quite powerful. Instead of just trying to survive from
one turn to the next in a defensive manner I was able to concentrate on
trying to do something more offensive in nature. hehehehe Like I cast a
wall spell around his wizard and boxed him in on the side of the screen and
made him abort his undead creature! hehehehe. Then the FREED elephant
killed his lion and an enemy bear has wandered into the corner so he is now
in an interesting position. By then it was 1:00 A.M. so we saved the game
and he went to bed.
I would NEVER have played so agressively in the olden days. But all that
kewl stuff in the corner activated the "greed factor" in us so we all went
there to fight over it.
Christmas day playtesting with Jerry, Joseph and JJ.
* BUG: Inanimate objects are exerting influence on artifacts. NOW FIXED.
* BUG: Joe cast Magic Bolt on a web and it increased the web's life to 33
points or something. Now REALLY fixed.
* BUG: I cast a Magic Bolt on a freshly generated skeleton. The skeleton
then had 25 life points! Now REALLY fixed.
BUG: computer wizard cast dark citadel several squares away.
BUG: computer wizard cast alliance and nothing happened. Maybe he aborted
it?
Ok, I'm home now and looking at the bolt bug. The *= -MSF fix is there in
the spell file. (I put it in the day you gave it to me.) But SOMEHOW it
is not in castmagic.c!!!!!!! ARGH!!!!!!!!!!!!!! Hmmm... I could have
sworn I did a smake clean before I did smake release.... I guess maybe
smake clean doesn't rebuild the castmagic.c.... The date on castmagic.c is
December 5th!!! oh well... I am doing a smake newspell now, then a
smake release then we will playtest some more.
Re: new font. I noticed that the fancy font was much easier to read on my
old Amiga 1084S monitor when I was testing the 1 meg version. Something
about the fuzziness smooths it out or something.
BTW: We were all gathered around for Christmas dinner with jillions of
relatives and my dad asked me "Why can't I read the letters on my screen?"
He said he thought something was wrong with his computer or monitor.
Admittedly my dad has serious vision problems. His eyesight was HORRIBLE
but then he had corrective laser surgery done twice and his vision is much
better now. He still wears contact lenses but they are many times less
powerful than his old ones. As a quick fix I am disabling the fancy font.
Feel free to add a menu option for "Fancy Fonts" on the drop down menus if
you so desire. He was using a 1084S monitor when he registered his
complaint.
Joe wants auto-switching with numeric keys.
Joe wants number of kills on score screen.
Joe is dying for the graphics upgrade to be implemented.
* Edited some spell descriptions and removed spell-casting ability from
Faun because I really hated it and couldn't stand it any longer.
* Played more games of Chaos with relatives. One of which I REALLY wish
I'd saved on turn 1. It was so incredibly strategic! As it turned out,
each individual player had to cast exactly the right spell in exactly the
right spot for several turns or they would die. It was AWESOME! Totally
cool! Hopefully I will make a level like that someday. (Only really
works with exactly 3 players though.) I ended up dying after several
turns all because I cast the wrong spell on turn 2.
* FLAW: Wizards kept subverting/abducting/betraying artifacts. NOW FIXED.
* Changed: Bipedal generators no longer produce bears.
* Changed: Moved end-of-turn gadget to be FAR away from question mark
gadget. My entire family has been bugging me about this for years. Every
time we play they say "That shouldn't be there next to the question mark."
* Implemented jcquadragram (jcquadspectrogram). I've always wanted to do a
seperate spectrogram for each of the 4 sound channels for many, many
years. I've always wanted to watch the different notes of the same
instrument "dance" as they play. Only now that I have finally done it,
it doesn't seem quite as cool as I had hoped. Oh well, maybe others
will have a different opinion.
* JCquadspectrogram has 32-note resolution. The original spectrogram and
jcspectrogram had only 16-note resolution. In spite of the increased
resolution it is still about the same speed as the original jcspectrogram
due to the fact that it caches pixels in a register and then writes out
whole words at a time to chipram instead of 1 byte at a time.
* l key for line of sight. It works like the other keypresses execpt that
this one simply shows all the cells that can be seen from the current cell.
This is very useful if you are thinking of casting a certain spell that
needs line-of-sight and you want to be sure that you have it. Simply
place the mouse pointer over your wizard and press "l" to see all the
cells that he has line-of-sight into.
* Fixed it so that the game startup after setup screen II doesn't look so
bad on slow machines.
SCREWEY BUG: The game has been working great for ages. But suddenly,
every time I do a smake release the game crashes on setup screen I. Yet if
I do smake clean smake dev it works fine. But then I do smake clean smake
release and it crashes on setup screen I. I can do a smake release and
then ONLY recompile init.tex as smake dev and everything works fine.
Totally strange. What could be causing this???
* Ok I've worked around it by forcing init.tex to NOT compile with the
"optimize" option. Now everything is working perfectly again.
* The line of sight testing was just too slow on A500 so I rewrote
isLineOfSight to burn up some memory but be 25% faster than before.
Joseph tried to design a level with your level editor but it went bonkers
when he tried to insert the wizards.
* EGADS! I was looking around through the Protracker Replayer Asm code,
trying to figure out how to implement my new instrument-flasher when I
became aware of the fact that the internal data format and file format
for protracker mods is horribly lame! For example, the instrument #'s
are stored as a byte. But the upper 4 bits of the byte are stored as
the upper 4 bits of byte 1 and the lower 4 bits of the byte are stored as
the upper 4 bits of byte 3. So all this anding, shifting and oring crap
has to be done. The net result is that the act of getting the current
instrument number takes 7 machine instructions instead of 1 like it
should. YICK! Oh well, at least I optimized it to now take only 6
instructions.
* Due to the lame data format there are about 50 stupid anding instructions
in the ptsplay asm code that wouldn't be needed if the file format made
sense. However I have now optimized the code and eliminated 4 of them,
saving 16 bytes and some cycles.
But to eliminate the others would require a whole new file format.
I noticed there were many other optimizations that I could do but I would
need to use a temp register to implement them and I am unsure if it is safe
to do so in those routines. Maybe I'll investigate it later.
* The archive was too big to fit on 1 720k floppy so I deleted the music
from the archive. The music has never changed since the day I first put
it in anyway. So for now the music/ dir won't be passed back and forth
in the archive.
***********************************************************************
************************* 1 Year Overview *****************************
Well it is now Jan 6th, 1998. I have been coding on Chaos for 1 year now.
We have acheived quite a lot during this time:
1) Numerous bug fixes
2) Numerous new features
3) Numerous new spells
4) Numerous code optimizations
5) I ended up adding over 256K of asm source to the game, quite a bit more
than I originally planned, with lots more on the drawing board.
The readme file of all the improvements is over 158K
I noticed back in October, 1997 that my C coding speed had noticeably
increased to the point that I could code in C just as well as asm.
There is still an AWFUL lot more work to do, but all in all it has been a
year filled with great achievments. Keep up the good work.
*************************************************************************
JC: ReleaseSemaphore
Chaos readme (cont.)
====================
This file continues Readme.1997
BEGIN: Chaos 2.2
SAI: Xmas report extracts follow
There are numerous bugs that we discovered. Some of them are to
be expected, some you will already know about, others are probably
better fixed by me. However, I'll list them all down along with
some other comments.
* The spell selection by computer players was notably slower on the
A500 (this is your new regime of spell selection). However, the
real problem here was that there was not enough on screen indication
of what was happening. NOW FIXED
* Somehow there was a sleeping neo-otuygh which was not redrawn.
* Somehow there was a sleeping ogre-mage that was still animated.
* Blob grows over earthquake, not sure if I like this or not.
* The team scores were still not correctly sorted.
* Several times players shot there own "hidden horrors" to reveal
the red dragon. I think the probability of the hidden horror needs
to be reduced below that of the red dragon. NOW FIXED
* The game locks up on the A500 when starting a new game after the
completion on the previous game. The only seems to happen when there
are lots of wizards. It can also be avoided by starting a new game
from the menu before the game ends naturally. I am assuming that this
situation is because memory is tight. NOW FIXED
BUGS:
* The teleport explode effect is applied to the wrong player. NOW FIXED
* The boil explode effect is applied to fire rather than water. NOW FIXED
* The initial set up was the same every time the program was loaded. NOW FIXED
* If you set the number of turns to "n" you actually get "n+1" turns. NOW FIXED
* Computer wizards and not conforming to the rules regarding the
necropotence spell and discard spell. NOW FIXED
* Cast agents have an off by one error. Best seen by the Faun casting
sleep on his own side. This is probably an improper wizards[]
reference. NOW FIXED
* Dad pressed the end-turn gadget in an attempt to cancel a spell. Instead
it tried to cast the creature to some location off the bottom of the
screen. NOW FIXED (end of turn ghosted during casting)
* There is insufficient information given to the player indicating
the pick up of a scroll. NOW FIXED (there is a text message and
an audio effect)
* Casting Biohazard gave all scrolls recovery -1 and they subsequently
all died in the next round. NOW ALLEGEDLY FIXED
* Flying creatures still show wings cursor even when engaged. NOW FIXED
* I cast a Meddle causing the nightmare I was mounted to become a skeleton
(i.e. I should now have been mounted on a skeleton); but when I moved the
skeleton my wizard was not moved. I think this means I need to check the
"mounted" bit carefully when doing reincarnation. ALLEGEDLY FIXED
* There was a radioactive land scroll. Human players creatures died on
trying to enter that cell (which is what is supposed to happen with
radioactive land), however, an independent crocodile merely walked
onto it. I've yet to check if they are immune from radioactive land
in more general circumstances. VERIFIED THIS PROBLEM IS MORE GENERAL
THAN I HAD ORIGINAL THOUGHT. Also affects pits. I'm leaving this for
the moment pending a bigger revision of computer movement to allow for
"eats" and "loathes" and the option of not moving at all.
* After high-lighting all your creations you need to click end-of-turn
twice if you decide to end while high-lighted. This can happen quite
often if you just want to check you have moved everything before ending
your turn. THIS DIDN'T HAPPEN ON MY COMPUTER -- DID YOU FIX THIS?
COMMENTS:
* Callum suggested the horn on the Abath should swing.
* Glen pointed out that the archery spell description does not actually
say what the spell does, although he guessed correctly. NOW FIXED.
* Computer players seem to make excessive use of Justice type spells
early in the game, leaving them short on powerful spells later in
the game. We often found ourselves holding back our styrong creatures
for the first five rounds until the computer players exhausted there
supply of justice spells.
* Computer wizard no longer casts castles close to wizard. (I originally
had code forcing wizards to cast castles adjacent to the wizards, but
I guess you deleted that in making the routines the same -- perhaps
we need to build a little more intelligence here).
--JC Reply: I didn't delete the code. It was still there all this time;
it just no longer had any effect in the new system. All has been FIXED
now. 8)
* Computer wizards make no attempt to collect scrolls (to the extent
that they will even get off a scroll if already standing on one).
* Glen wanted scrolls to appear slowly (something like one a turn,
rather than having them all on the screen at the outset).
* Callum wanted "RETURN" to mean end-of-turn. NOW FIXED
* Callum wanted a key exit from the info panels, he would most like
"q" to start the panel, and then another "q" to exit from it.
* Callum suggested the right hand set of bars on the info pages be
labelled "Recovery" at the top. NOW FIXED
* Dad didn't like the way that "Abduction" chose growths rather than
real creatures.
More changes:
* Fixed a bug with Repulsion which could leave the colours permanently
screwed up.
* Made isStupidCast compliant with agent casting.
* Made menu option for script font on info screens.
* Made menu option for agent casting.
========= Beginning of computer movement upgrade =========
Phase 1: Elimination of GetPlainWeight in cmove.tex.
The function GetPlainWeight is a major bottleneck in the calculation
of computer movement since it is called approx. 8n times for each
creature to be moved where n is the board size, flying movement
requires considerable more calls than this. Further, in a previous
effort to improve speed this is *really* only done once for each
player per turn, but the games plays better if it is done properly;
and this is the only way to implement "eats" and "loathes" properly.
A quick look at GetPlainWeight reveals that despite the large number
of conditionals most objects return a unique value. There I have
added a new tag "Weight" to the spell manager to store the values that
this function should return. If the tag is not given for a particular
spell, then its value defaults to "Life" as indicated by the function
GetPlainWeight. I have already added the tag to the appropriate spell
files. Another benefit is we will be able to modify behavious on a
level by level basis and have much finer control over computer movement
than was previously possible.
Well on the subject of crude approximation, note that the current
flying movement only considers ranges of one of the creature's
maximum (in the past it has been far too slow to do this properly!)
YEP, IT USED TO BE WAY TOO SLOW DOING THIS PROPERLY.
Also due to an oversight it is impossible for a computer controlled
creature to decide not to move if already well positioned.
The majority of GetPlainWeight can now be eliminated. Hence it is
better inlined inside CalculateWeights. Hence GetPlainWeight is now
completely deprecated and has been deleted.
Note that the corresponding function GetWizardWeight is called a maximum
of about 64 times in a round and hence is not at this time worth
modification. I think we can tolerate a slight delay in the movement of
wizards, they are after all supposed to be erudite fellows.
The above has taken care of all the checks except isDead, isAsleep, and
isTOwned. By modifying some basic functions in core.tex the isDead and
isAsleep checks can also be eliminated. Thus, the only problematic case
is isTOwned and since the same table of numbers must be used by all players
there is no way of circumventing this difficulty. However, we have suceeded
in reducing 7 conditionals (some with complicated predicates) to a single
conditional and a table lookup. However, this will eventually increase by
two conditions when "eats" and "loathes" are implemented.
Since CalculateWeights was only used in one place and there is no longer
any advantage in its precomputation I have eliminated it. This is made it
much easier to implement "eats" and "loathes".
Two constants control the strength of the "eats" and "loathes" effect and
these may need to be fiddled with to find nice values. The loathing effect
is in theory strong enough that a creature would prefer to jump into a pit
or walk on radioactives (but of course in practice a creature would just
sidle away from both).
Stopped the computer from moved onto nuked squares. Allowed computer
creatures to decide the best option is not to move.
Computer wizards now move towards and stay on scrolls.
============== end of computer movement upgrade ================
* Added Turns, Dread Elf, Dagger, Gravity, Demonic Touch
* Added secret power up WoodElf->DreadElf (make 5 kills with wood elf)
* Added gravity to information display.
* Fixed FileIO to save gravity information.
* Changed [] in print statements to () (to work with script font)
* Classic mode no longer default mode for DEVELOPER
* Fixed end-of-game bug that caused lockups. Still haven't fixed
the quit bug.
* Allegedly completed implementation of Volcano.
* Added two new generators: one for birds, one for dragons.
* Improved the loading and saving of the probability table.
* FIXED at last the ReleaseSemaphore problem when quiting the game.
* Improved Spell Manager documentation.
* Modified InsertCreature to handle player=ASLEEP properly.
* Made fake wizards actually capable of spell casting.
* Allowed combat on movement rating (see Arctic Wolf).
* Added: Arctic Wolf, Virtue, Shadow City, Basilisk, Achiyalabopa,
and Paradigm Shift.
* Added function AddSpecificSpell() to spell.tex (thus you can
now give a player a particular spell when desired).
* Added noddy basic program "sayer" to archive.
* Made <RETURN> equivalent to end-of-turn. Problem: holding down return
will cause multiple player to have end-of-turn. To overcome this I
have put in a delay, but this is a rather weak solution. If only there
was a RAWKEYUP IDCMP event this would be easy to fix, but I couldn't
find anything in the docs about doing this.
* Replaced $ in chaos.font with a bullet.
* Improved the image for the Nuke spell.
* Improved the image for the Lightning spell.
* Stopped display of Nothing spells.
* Added: Animate, Ball Lightning, Shocker, Basalt Golem, Emerald Dragon,
Willy, Glass, Battle Cry, Coercion, Confidence, Eye for an Eye,
Torment, and Materialize.
* Made the secret powerup GreenDragon->EmeraldDragon.
* Implemented Eye-for-an-Eye in combat routines.
* Changed io.tex to take account of changes in Wizards structure.
* Changed info.tex to display new powerups.
* Fixed a small problem in the intro sequence where "Wizards" and "Webs"
were printed multiple times.
* Made the lmkfile say "Compilation Complete" at the end, so I can do
something else while waiting for a recompile.
* Made a small change to BoardNormalize for speed.
* Moved multiplicity information from cast.tex into the spell files using a
new tag multiplicity. While I was at it, I increased Strong Wall from two
pieces to three pieces, and made Slow and Speed each give three attempts
(in an attempt to make these spells more useful).
* Added "bullet.gif" to archive.
* Modified the Spell Manager to also produce a HTML WWW page detailing
all the spells with an index at the top. This means I can now easily
browse the spells on my PC.
* Added new powerups for creatures making high numbers of kills (in the
form of specific bonus spells).
* Devastation spell now correctly awards points.
* Added casting contraints to computer spell selection for new spells.
* Moved the foes vanquished display onto the first info screen.
============= start of editor upgrade =========================
* Added ALT-o menu-like system to editor.
* Added editor support for artifacts.
* Stopped insertion of objects belonging to player 0 (other than artifacts)
* Better support for inserting wizards.
* Can toggle undead status using "u" key.
* Undead status shown with a red tick at top of cell.
* Fixed a ClearBoard/Vanquish/ALT-o edit clash.
============= end of editor upgrade ===========================
* Replaced the reqtools with a file requester of my own making.
It is pretty slack at the moment, but at least we can get rid
of reqtools now. This is good for three reasons: (i) less
effort for uses (don't need to install reqtools), (ii) smaller
overall memory requirement for game, (iii) no negotiation
needed with reqtools author for a commercial release.
* Tidied up prog.tex documentation, particularly near the top.
Added a small ancient history section.
* Allegedly reduced the likelihood of computer creatures shooting
wizards protected with invulnerability.
* I made a bootable disk but for some reason the topaz font was
different and had wider width than normal when I started this
game. As a consequence some of the set-up screen were not
quite right.
-JC reply: You forgot to have an 80 column system-configuration file in
your devs/ dir. If this is missing then the OS defaults to a 60 column
topaz.
* If the level now increases above 5, then new spells (and the
initial spell list in the case of computer wizards) will be
composed mainly of unique spells.
* Added FLAG_SINGLE to computer assistance flags and increased the
assistance array to work from BowID onwards. FLAG_SINGLE in now
set for spell which should NOT be cast with double or triple
active.
* Converted the Intelligence stat from 3 bits to 4 bits and modified
all spell files, info.tex, and cast.tex accordingly. If we made
.MR 4 bits most stats would then be the same, but the MR case would
be a lot harder to do than Intel was.
* Added FLAG_NOWIZARDCELL to the computer assistance flags, to
indicate spells not to be applied to cells containing a wizard
even if the wizard is mounted or meditating (e.g. Alter Reality).
* Creatures killing their favourite food now get a combat and
recovery rate boost.
ObtainSemaphore (James Conwell) April 1, 1998 Begin Version 2.3
* Made a small change to the makechaos file so that it would work ok.
Upon first compiling the game from a fresh dir using smake unarchive there
is no rein.h file present so therefore reincalc cannot compile therefore
when the makefile attempts to run reincalc it simply isn't there and
doesn't run it. The makefile then continues on its merry way. I assume
this means that critical information is not being compiled into the game
regarding reincarnation. As this is the domain of SAI I am leaving this
for him to fix. NOW FIXED
* I converted my new game musics which I did months ago into protracker
format so they could be played by Chaos but 2 of the musics wouldn't
convert correctly due to using more than 31 instruments. And another
converted ok but sounds a bit off (Maybe its just my imagination). In
any case I will have to now add OctaMed support to music.lib in order to
play all the new music. I anticipate this will add several K to the code
size. I guess I won't bother adding this until after the 1 meg version
is finalized.
* BUG: Computer wizards refused to cast Magic Bow if they had double or
triple in effect. Bows and swords are cumulative so it is desirable to
cast them with triple. NOW FIXED by removing CAST_SINGLE from bow.spl.
* EDITED spell descriptions: Gray Elf, Willy, Arctic Wolf, Gravity, Virtue
(btw: why is this spell called Virtue?), Paradigm Shift, Ball Lightning,
Emerald Dragon, Battle Cry, Coercion (shouldn't this be called mind blank
or something?), Materialize, Meddle.
* NOTICED: I noticed that some of the spell descriptions have been rewritten
to be more succinct. I like this.
* BUG: Now that you have shifted the info screen, the stat-highlighting is
off since it wasn't shifted to match. The hotspot was off too. NOW FIXED.
* BUG: Magic Glass doesn't say "Blocks LOS Enemy Only" on 2nd info screen.
FIXED.
* BUG: a dragon just shot my wizard through a magic glass. The "l" key shows
that the dragon does not have line of sight to my wizard yet he shot him
anyway. The shooting routine (at least for independents) must not be
taking into account Line of Sight rules 100%. The problem turned out to be
that the shooting code was checking for LOS like this:
if (!isLineOfSight(cell,c) continue; when it actually is supposed to be:
if (!isLineOfSight(c,cell) continue; FIXED.
BUG: I saved my game a little while ago with some Magic Glasses on the
board and now that I reloaded it I find that the reloaded game does not in
any way resemble the game that I saved.
BUGS: The filerequester sometimes never goes away. Sometimes it says it
loads a game but doesn't redraw the gameboard.
* CHANGED: Dagger -> Poison Dagger
* CHANGED: Basilisk ranged weapon to attack movement rating. (Basilisks are
supposed to paralyze with their gaze. 8)
* FLAW: Clicking on Ranged Combat on Info screen of Basilisk or Arctic Wolf
does not highlight "Movement" so that you can see that they attack
Movement instead of life. FIXED.
File requester doesn't even have a cancel button or any way of navigating
dirs. One time I quit the game and the requester screen was left up even
after the game had terminated. In fact, it is still up now, hours later.
FREAKINDICULAR!!!!! I just went back to look at it and uhhh... it has
become exactly like the main game screen!!!! It looks just like the game
board!!!! And it is animated too!!!! All the creatures are in the same
place!!!! WOW!!!! Holy cowabunga!
Now I quit the game and the ghost screen has gone blank again like it was
before I started! How is this possible??? The ghost screen is still up,
just completely black. weirdness...
The only way this is possible is that both screens were pointing to the
exact same area of memory. So each "screen" was simply a different window
onto the same area of memory. Mystery solved.
* Implemented req.library file requester into the game.
I've been planning to do this for ages but never had time before.
This has the following advantages:
1. Easy to use.
2. Features high-speed smooth scrolling.
3. Features powerful pattern-matching.
4. Features directory caching. (YAY!!!!)
5. I've been using it for years and it is perfectly reliable.
6. No negotiation needed to use it in our products.
7. Only 18436 bytes in size. That's 27,700 bytes smaller than
reqtools.library and 22,508 bytes smaller than asl.library.
STRUCTURE COLLISION! reqbase.h defines a "FileRequester" structure but so
does the new asl.h I am renaming the structure in reqbase.h to be
"FileRequesterStructure". Hopefully that will fix everything.
reqproto.h modified appropriately.
I copied the following files:
copy reqproto.h to include:proto/ clone
copy reqbase.h to include:libraries/ clone
copy req.library to libs: clone
copy lreqglue.o to lib: clone
The LoadGame function causes 3 enforcer hits while reading block W.
Well... now the problem seems to have mysterously vanished. ??
I fiddled around with the colors of the requester but never found any
that I really liked. I'll leave the selection of colors to whoever wants
to do it. I'd like the window border to be dark blue but I don't know
how to do that.
PROBLEM: After I've played Chaos for several hours and I'm really tired
I sometimes select load when I meant to select save. Sometimes I select
save when I meant to select load with disasterous results. Sometimes
this happens due to tiredness and sometimes due to a less than 100%
Right Mouse Button. So I made the load and save screens noticeably
different. PROBLEM SOLVED.
* PROBLEM, after selecting save then cancel the text at the bottom of the
screen is erased so you can't tell whose turn it is. FIXED.
* NEW FUNCTION VerticalWriteText
---------- Resumption of Efficiency Upgrade Speed/Memory -------
Chaos is currently
1288456 / 342808 bytes in size.
* Edited cmove.tex:
1259496 / 342640 Saved 168 bytes in GetWizardWeight
1259448 / 342568 Saved 72 bytes in EngageChoice
1259432 / 342500 Saved 68 bytes in cMoveEngaged
1259360 / 342364 Saved 136 bytes in cMoveNonEngaged
1259232 / 342212 Saved 152 bytes in MoveAutomaticallly
1259224 / 342180 Saved 32 bytes in cShootScore
1259236 / 342140 Saved 40 bytes in cShoot
TOTAL SAVED cmove.tex 668 bytes.
* BUG: Computer controlled archers refuse to shoot things that they don't
have Line-of-Sight to. In other words, computer creatures which have
archery ability are never actually _using_ their archery ability.
NOW FIXED.
* CHANGED: Bolter to have 0 Combat. (Since they can't attack anyway.)
* CHANGED: Magic Glass to not need line of sight when casting it. And it
can now be cast on corpses too.
Chaos is currently
1316936 / 342152 bytes in size.
* Edited move.tex:
1288092 / 342104 Saved 48 bytes in isEngaged
1287028 / 340904 Saved 1200 bytes in Combat
1287016 / 340848 Saved 56 bytes in MoveEverybody
1286920 / 340640 Saved 208 bytes in SpecialCombatHandler
1286812 / 340500 Saved 140 bytes in MoveTempest
1286580 / 340212 Saved 288 bytes in Growth
1286572 / 340180 Saved 32 bytes in SelectCreature
1286584 / 340168 Saved 12 bytes in SayCreatureName
1286532 / 340088 Saved 80 bytes in GetNewCell
1286184 / 339712 Saved 376 bytes in CrMove1
1286160 / 339596 Saved 116 bytes in DoShooting
1286164 / 339576 Saved 20 bytes in CrShoot
1286136 / 339524 Saved 52 bytes in Killed (Standard Editing)
1286096 / 339472 Saved 52 bytes in Killed (Replaced 7 occurences of van_count[loc] with *van_countp)
1286108 / 339380 Saved 92 bytes in CanGrow
TOTAL SAVED move.tex 2772 bytes
******** Memory Efficiency Upgrade COMPLETED (finally) ****************
* FLAW: After clicking on a flying creature the really cool mouse reporting
is turned off so you can't automatically know what your mouse pointer is
over. FIXED.
* FLAW: After clicking on a ground creature the really cool mouse reporting
is sometimes turned off so you can't automatically know what your mouse
pointer is over. FIXED.
* CHANGED: Inanimate objects are no longer highlighted in the color cycling
color when you press the number keys. Technically, it was correct to
highlight them with the color cycling color since their moved bit was not
set but since you cannot move inanimate objects or even click on them I
decided it was best to have them highlighted like other objects which can't
currently be moved (in red). Ditto for growths.
* CHANGED: Speed spell gives 2 attempts instead of 3.
***** BONUS SPELL SELECTION UPGRADE *****
* Upgraded Bonus spell selection so that you can see what you did to earn
the bonus spells.
* Edited bonus.tex
* Edited cast.tex
* Edited prog.tex
* Edited move.tex
* Edited all relevant spell files
* All appropriate code sequences now replaced with a call to the new
AwardBonusSpell function.
* Edited init.tex to initialize the new info properly.
* Edited io.tex to properly load and save the new info.
***** BONUS SPELL SELECTION UPGRADE COMPLETE *****
* BUG: Pyrotechnics wasn't awarding bonus spells based upon what it killed.
It was always awarding the number of bonus spells associated with killing
wizards rather than the creature actually killed. FIXED.
* BUG: Pyrotechnics wasn't awarding points based upon what it killed.
It was always awarding the number of points of a wizard's initial life
rather than the number of points of initial life of the creature killed.
FIXED.
* CHECKED Storm for the same bug as Pyrotechnics, but it checked out ok
with no bugs found.
* Fixed Team score sorting bug. The problem was that the scores were being
calculated based on team numbers but displayed based on player numbers.
It needed to be calculated and displayed based on one or the other.
NOW FIXED.
* BUG: Computer players are casting Magic Castles and Dark Citadels far
away from themselves. FIXED. (This was considered stupid so I just
modified isStupidCast to detect this.)
* CONFUSING: The display of the Team Icon on a Wizard's info screen
display. This is no longer needed due to the improved number keys + Team
Score display. REMOVED.
* q key now quits from info panels any other key continues on just like a
LMB (Left Mouse Button) press. Now using the q key RAWKS!
* BUG: At one point in the music, the lowest note of spectrogram 3 is
showing up as the highest note of spectrogram 2.
Made a simple 1 channel mod that plays notes from lowest to highest
and watched it on my scopes to see if it played correctly.
WOAH! All this time my spectrograms were significantly off!
Spectrogram 1 was ok but spectrogram 2 was off by 4 bytes and spectrogram 3
was off by 8 bytes and spectrogram 4 was off by 12 bytes!
So basically you just couldn't see the lowest notes in the display.
ALL FIXED NOW.
* REMOVED all support for Oktalyzer music since the Oktalyzer replay code
in music.lib was bugged and couldn't play my >64k samples and since I
only had 1 ChaosTheme song that was 8 channels anyway and since I am about
to finalize the "final" 1 meg version of the game.
Removed over 50k of assembler source code.
music.lib reduced in size from 34780 -> 24112 saved 10668 bytes.
This reduced the executable filesize by 14108 bytes.
I figure we can better use that 14k for other things right now.
* Implemented "Instrument Flashing" into Music.lib asm code. This allows
us to detect and do something anytime a particular instrument in the music
is played. Its primary purpose is to allow us to animate something to
the beat of the music. (The quadrascope and spectrograms work by channels
not by instruments.)
* Implemented monster dancing for song 1. I finally got "Instruemnt Flashing"
working for Monster Dancing but now I see that the OS DrawImage routine is
soooooo ridiculously slow that I can't even have *1* monster dancing on a
25 Mhz 030 without it screwing up and slowing down my jcquadragram. And
on the 7Mhz 000 it looks atrociously bad. 8( So I am leaving the code
intact just not "activating" it until someday when I have time to
integrate my new asm gfx routines which are a zillion or two times faster.
Oh well, at least I can see that the concept will look fairly kewl.
Or we could just convert a few Monster Images from DrawImage format into
Sprite format and then just animate the sprites. That would be vastly
faster and would work on any Amiga right now. Does anyone want to do
this?
* BUG: Selecting QUIT from setup screen I or II causes the game to crash.
FIXED by commenting out the code for the QUIT and LOAD gadgets. This was
the easiest and fastest way to fix this problem and it makes the program
simpler and easier to understand since now the ONLY way to quit or load the
game is from the dropdown menu in the main game.
I left all the gadget code intact in init.tex in case you
want to use it / fix it in the future. I'm just in a hurry to get the final
A500 1 meg, no HD version done at the moment.
* IMPROVED ChaosDocs.tex a bit.
******************* Editor Upgrade *****************
* FIXED warnings about no prototypes in editor.tex.
* FIXED the flaw where it still said you were in the editor after you had
quit the editor.
* PROBLEM: I can't tell what my mouse pointer is pointing at when using the
level editor because the really cool auto-mouse-reporting feature isn't
there 8(. I just LOVE always knowing exactly what I'm pointing at
because A) Some creatures look just alike and B) I don't remember what
every spell looks like. Indeed, this is the main reason I liked using my
mini-level editor; I always knew exactly what I was looking at because the
computer always automatically told me, no guesswork involved.
SOLUTION: I put in auto-mouse-reporting code into editor.tex. YAY!!!
* ShiftKeyIsBeingPressed is now a global variable.
* Enabled keypresses in Main Level Editor.
Made several routines:
KeypressNumeric(); // Show all creatures on your team.
KeypressL(); // Line of Sight
KeypressM(); // Move
KeypressR(); // Range of shooting weapon
KeypressS(); // Shoot (Things you can actually shoot)
* FIXED the top level of Alt-o menu system to print the name of the actual
category that you are pointing at. (I had always intended my alt-o mini
editor to do this but just never got around to it.)
* Enabled Keypresses even during the Alt-O menus. Now when you have a list
of undead creatures sitting in front of you and you want to pick one that
is tough but has a low recovery rate you just press q on each one and look,
_then_ you pick the exact one you really want with your mouse. Nifty.
* This also was a good excuse for me to clean up the HandleIDCMP code a bit.
* Now the official level editor is good enough that I can quit using my
mini-level editor! In fact, I seriously considered deleting my
mini-editor from the source code but I refrained from doing so because
once I start implementing a future gigantic, complicated upgrade there may
be a period of time during the transition where the official level editor
stops working. During such a time I can still use my editor to throw
monsters on the screen and test new gfx routines and stuff.
* New Predicates: isIDspecialcombat, isIDweirdattacker, isIDcastfree
* New classes of creatures such as "Flying Shooters"
"All creatures with weird attacks", "All creatures with special combat",
"CAST_FREE Scrolls" and "Spells that require a target".
* Completely rewrote Info.tex to use pointers to Cell Structures rather
than copies of Cell structures.
1. This allows the usage of our standard IsDead, IsUndead, IsCloaked and
IsScroll macros instead of all that char_stat.stat & XXXX_STAT code;
thus making the code a bit easier to read.
2. I had to do it so that the level editing code in info.tex could
actually change the values of stats.
3. Doing this + deleting dead code + making optimizations saved 1972
bytes on the smake dev code size.
* Implemented stat-editing on info panels when brought up from within the
level editor (LevelEditorActive==YES).
Use the mouse to click on the stat and then enter the new stat right on
the screen.
* MODIFIED COMBAT, RANGED COMBAT, SPECIAL COMBAT GADGETS TO HANDLE UP TO 4
CHARS. -15(NULL).
* BUG: Most recovery rate graphs are not being redrawn when clicking on
Combat, Ranged Combat or Special Combat to see what they attack. FIXED.
I couldn't figure out how to control the color of string gadgets... ???
It doesn't matter right now but it might in the future.
* Upgraded CheckHotSpot to handle any size of BoundingBox Structure.
(Bounding Box Structures are now terminated with {-1,-1,-1,-1}
* You can now edit attributes on the 2nd info panel. Just click on a
stat to toggle it.
* Tested making an attacking, flying, shooting, meditation, mountable set 1,
creature generator. Hehehehehee HARHARHAR ROFL!!!! It actually works!
I can fly my DragonNest around the screen attacking and shooting things!
And I can mount it and dismount it!!!! And it emits dragons for me even
while my wizard is mounted in it!!!! ROFDL!!!! The game engine gets an
A+ for allowing this to work on the first try!
* I inserted code for editing Move_Recover and Range_Recover stats
into info.c. Just uncomment 2 lines of code and it will work.
flashfind from "" search Move_Recover and uncomment all the other
lines of code in other modules and all will work fine whenever you
add Move_Recover and Range_Recover stats to the game. I would have
went ahead and added them myself but I wasn't sure how to do it anymore
with the new system.
Ok that's it for this upgrade. I'll leave the editing of names, scores,
and spell lists to SAI.
****************** End Editor Upgrade *****************
* FIXED those blocks for Range and Move on info panel. Scooted them down 2
pixels.
* MAJOR FLAW: sometimes the speech doesn't work, sometimes it does... it is
completely random. This affects monster names, creature names, player
names, everything...
Put breakpoints on SayCreatureName, SayName and Say and then play a test
game and figure out what the hell is happening... I just couldn't find any
pattern to the failure of the speech. At first I thought maybe it was an
unmatched say/waitforsay pair but after checking through the game for an
hour that just wasn't it. So then I thought maybe some other sound effect
was somehow not releasing the audio.device (like maybe the combat sound
effect) But no that just wasn't it either. Ok, well I finally found the
problem in the Say() function:
voice_io.pitch = 65 + MSGRandom() & 0xFF;
Sometimes this sets voice_io.pitch to a very low number like 21 or 28 etc.
Values this low produce no sound in the speech system.
Changing the offending line to:
voice_io.pitch = (UWORD)(65 + (UWORD)MSGRandom() & 0x00FF);
still doesn't work... Must be changed to:
voice_io.pitch = (UWORD)65 + ((UWORD)MSGRandom() & (UWORD)0x00FF);
NOW COMPLETELY FIXED.
* Nowhere did it say what type of value MSGRandom returns, not even in its
prototype. NOW FIXED (int)
SAI: In C if a prototype does not designate a return type it is assumed to
an int. However, it is generally better to define it anyway.
??? Creatures with 0 move and 0 manuverability sometimes are not
engaged to adjacent enemy creatures. How is that happening? It used to be
that 0 manuverability meant you were automatically engaged to any adjacent
enemy creature. Did you change this on purpose? This is fixed months
later.
* FIXED: Pressing Amiga-m or Amiga-n on info screens was clearing the info
screen because ANY key triggered going to the next info screen. NOW FIXED by
simply ignoring all keys except for q=quit and w,a,tab and return take you
to the next info panel.
* Speeded up line of sight testing by about 30% in many cases. YAY!
Well, I haven't added any new asm code in over 2 weeks so its about time
for:
* Speeded up SqDistance by 5% (eliminated 8 cycles) asm SqDistance is now
over 12x as fast as C SqDistance. YAHOO!
* Speeded up SqDistance again. (Eliminated 4 cycles on 68000. 68030 cycle
count unchanged.
********* HIGH-SPEED Vector Graphics Upgrade ****************
********* PART I ****************
* Implemented hyper fast sin and cos asm functions. (JCSin and JCCos)
James Conwell's FAST Trigonometric Functions.
=============================================
I could never decide what to call these next 2 functions.
I could just call them FastSin and FastCos but that would infer that
they do the same thing as sin and cos which they DON'T.
These functions have less significant digits than the "real" sin and cos.
These functions are MUCH faster than the "real" sin and cos.
These functions require the input angle to be measured in units of jams,
NOT degrees or radians. 1 jam = 1/4096th of a complete circle.
512 jams = 45 degrees.
1024 jams = 90 degrees.
2048 jams = 180 degrees.
3072 jams = 270 degrees.
4096 jams = 0 jams = 360 degrees = 0 degrees.
btw jams stands for "James' Angular Measurement System". This system
fully utilizes the power of binary integer arithmetic inherent in all
CPUs.
Since the ABSOLUTELY SMALLEST angle that could ever be graphed on a
standard Amiga display is 1/640th of a circle, dividing a circle into
4096 equal parts should be far more resolution than needed.
Furthermore, it would require the use of the entire width of the screen
to graph an angle of 1/640th of a circle, so it is unlikely that we would
ever need 1/640th of a circle resolution.
These functions derive their speed by:
1: Using fast lookup tables.
2. Using integer multiplication instead of Floating point Multiplication.
3. Using perfectly optimized assembly language code.
Only 7 instructions for the whole routine! (And 1 of those is RTS)
Note that I overlapped the sin and cos tables so that instead of having 2
seperate 8k tables I have only one 10k table.
The table size could have been greatly reduced by defining a jam to be
only 1/2048th or 1 /1024th of a circle. But I wanted lots of accuracy to
be safe. (Some games and demos allegedly get away with a 256 angles per
circle system)
TIMINGS for Result = Multiplier * Sin(angle)
1 frame = 1/50th second.
Processor Clock Rate Method Speed
68000 7.15905 Mhz scm.lib (IEEE double) 206 calls/second
4.1 calls/frame
68000 7.15909 Mhz mathieeedoubtrans.library 222 calls/second
(IEEE double) 4.4 calls/frame
68000 7.15909 Mhz mathtrans.library 1282 calls/second
(Motorola Fast Floating Point) 25.6 calls/frame
68000 7.15909 Mhz JCSin asm code 58000 calls/second
(16 bit precision) 1160 calls/frame
68030 +
68882 FPU 25 Mhz mathieeedoubtrans.library 13000 calls/second
(IEEE double) 260 calls/frame
68030 25 Mhz scm.lib (IEEE double) 1190 calls/second
23.8 calls/frame
68030 25 Mhz JCSin asm code 232558 calls/second
(16 bit precision) 4651 calls/frame
Time to JUST multiply a double * a double using scm.lib:
68030 25 Mhz scm.lib 24509 calls/second
490 calls/frame
84 seconds to do 100000 multiplier * sin(angle) with scm.lib
4 seconds to do 1000000 JCSin.
43 seoonds to do 10 million JCsin
408 seconds to do 10 million scm.lib double * double
So as you can see, even if we are doing simple rotation where we can
precalculate value*sin(angle) and then just do double * double in the main
loop JCSin is 9.49x as fast!
JCSin can calculate the sin of a number and multiply it by a value 9.49x
as fast as SASC can _just_ multiply two IEEE double numbers together
_without_ any sin calculation!
At the time of this writing, Chaos (world's best strategy game) is
drawing vector graphics to the screen using the "Precalc IEEE double
method" whereby the main loop doesn't need to do any slow sin/cos
calcualations. Nevertheless, rewriting that section of code to use JCSin
will increase the speed of the math computations by a factor of 9.49!
I put off implementing these routines for a long time because at first
Chaos had no vector graphics so I decided to delay until I was ready to
implement some vector graphics. But then one day SAI implemented a
roatating vector pentagram and I knew then that I would have to move up the
day when I implemented these routines. That day has come.
If we are going to have vector graphics in Chaos then dammit! We are
going to have vector graphics just as good as everyone else!
I want Chaos Vectors to be just as good as Star Wars, Empire Strikes
Back, BattleZone, Tempest, etc. JCSin and JCCos are a solid first step in
that direction. BTW: I _LOVE_ vector graphics! I've wanted to program
animated vector graphics ever since I first saw an ad for an Apple ][
circa 1981 that had some sort of graph plotted on the screen.
(Of course this blue graph couldn't move at all, but I didn't know that
from looking at the advertisement.)
LIMITS:
sin and cos values have 15 bits of resolution + 1 sign bit.
Multiplier inputs are limited to -16383 to +16383. This should be WAY
WAY WAY more than we really need.
Final answer contains 15 bits of resolution + 1 sign bit.
This should be WAY more than we need for drawing vector graphics and just
the right amount for generating 16-bit sound samples.
UNITY=32767
Smallest angle = 1 jam = 1/4096th of a circle = about .088 degrees
It is totally safe to call these functions with large angles. It
automatically takes care of "wrap-around" angles. So if you need to add
angles up to more than 4096 jams then go right ahead. It can wrap around
several times and still work perfectly. Beyond that is untested.
CONVERSIONS:
AngleInDegrees = 360 * AngleInJams/4096
AngleInRadians = 2 * PI * AngleInJams/4096
AngleInJams = 4096 * AngleInDegrees/360
AngleInJams = 4096 * AngleInRadians/2*PI
HOW DOES THIS WORK?
Well, since it seems that sin and cos are always used in conjuction with
multiplying by some number and since floating point multiplication is
inherently VERY slow I decided to make a system that could use integer
WORDS to do the same thing, only faster.
You give these functions a multiplier and an angle measured in jams and
you get a result of the sin of the angle multiplied by the multiplier.
This should allow us to do high-speed vectors with scaling and rotation
of any angle and speed we desire.
**************** PENTAGRAM VECTOR UPGRADE **************
All timing tests performed on A3000/030 @25Mhz with all CPU caches on and
burst mode activated. Of course I removed the WaitVblank code for this
timing test so I could find the absolute speed of the code.
Original MenuAboutUpdate 10,000 times
Entire thing = 90 seconds = 112 calls/sec = 2.2 calls/frame.
This means that each call takes about .44 of a frame to execute so that if
the pentagrams were being drawn in the bottom 1/2 of the screen then it
should theoretically be fast enough to run at 50 fps on 030 with no flicker
without being optimized.
In any case the current speed is nowhere near fast enough for the A500.
Just the mathematics = 10 seconds = 1000 calls/sec = 20 calls/frame
Just the graphics = 80 seconds = 125 calls/sec = 2.5 calls/frame
Upgrade Part 1: Changed WriteMask to 0x08
Just the graphics = 20 seconds ( 4x speed increase)
Upgrade Part 2: Copy the first pentagram with ClipBlit() instead of drawing a whole new one.
Just the graphics = 18 seconds (Very disapointing speed increase 8(
Upgrade Part 3: Rewrote Mathematics to use JCSin and JCCos
Just the mathematics = 1 seconds (10x speed increase)
Just the graphics = 18 seconds
Whole Routine = 18 seconds
Upgrade Part 4: Disabled ClipRect
LoResRastPortClipRect=rastPort->Layer->ClipRect;
rastPort->Layer->ClipRect=0;
DID NOT WORK. 8(
LoResRastPortLayer=rastPort->Layer;
rastPort->Layer=0;
WORKED!
Whole Routine = 16 seconds (11 % speed increase)
Upgrade Part 5: OwnBlitter() DisownBlitter() FAILED.
Attempting to surround all the Draw() commands with
OwnBlitter()/DisownBlitter() resulted in a machine lockup.
OwnBlitter()/DisownBlitter() do NOT nest. Any task attempting 2
OwnBlitter() with no intervening DisownBlitter() will lock up.
(I learned this the hard way but it is documented in the RKM)
Upgrade Part 6: DoubleBuffering. AVERTED for now.
Since the pentagram drawing routine now takes less than .04 of 1 frame
to execute this means that if we draw the pentagrams further than .04
of a frame down the screen (10.24 pixels) then we don't need to
double-buffer it (Referring to time on 25Mhz 030). Since the pentagrams
are currently about 24 pixels down the screen we should be safe, even on
the A500. But be warned that in a period of high-cpu load multitasking
the pentagrams might start to flicker due to not being double-buffered.
I was having a problem that I had anticipated: The pentagram was
"degrading" after multiplle rotations due to cumulative round-off error.
So I fixed it by simply having all rotations based upon the ORIGINAL
cooridinates of the pentagram. Instead of rotating 23 jams each time, I
have it rotate 23 jams the first time, then 46, then 69 etc. However,
this brought up a new problem:
Trying to rotate the object more than 512 jams (45 degrees) at one time
causes the pentagram to begin shrinking and expanding randomly. ????
This problem is being caused by the fact that JCCos is returning wrong (and
strange) values beyond 45 degrees / 512 jams. I can't for the life of me
see what could be wrong. AFAICT this is caused by a bug in Devpac when
assembling large tables. CodeProbe just freaks out and starts lying to me
about the contents of registers whenever I try to trace through the code.
* Made numerous changes to AnimatorAsm.s so that the SASC "asm" command
could assemble it... All was going well but there is a bug in SASC 6.5
"asm" that prevents it from using binary numbers in the data sections
(Which is very strange since binary numbers work fine in the code sections).
I am very tired now and have other things I must
work on. In the meantime I have used the symmetry of the pentagram to work
around this problem with a little trick. When the rotation reaches 512
jams I reset it back to 0 jams and all works fine.
* Ok I have now proven for a fact that Devpac is NOT assembling AnimatorAsm
correctly. It is not including about 4k of my sin/cos table for
some strange reason. As soon as I upgrade to a new version or switch to a
different assembler all will be working fine.
* Tried inserting numerous fake labels into the asm data so that there would
be <1000 bytes of data between labels but this had no effect. My table is
STILL not being included in its entirety. 8(
* Switched the asm source over to use the A68K assembler (This is the
assembler that I have been using on music.lib) version 2.71 1991. It has
the EXACT same bug that Devpac 3.14 1994 has! This is very strange. I
even increased its hash size to 9999 and its heap to 30,000 but this had
no effect.
* Attempting to switch over to ASM-ONE v1.16 1993. I used to use v1.08B
1991 of this assembler a lot years ago because it has the best user
interface. Unfortunately it had certain bugs so I eventually stopped.
Trying now: It can't handle the @ sign in fuction names. It can't handle
spaces in dc.w statements. It can't handle local labels (at least not
with \) Giving up on this. 8(
* BREAKTHROUGH! Using A68K assembler I have just found that if I remove
the 14 blank spaces in my dc.w lines that it then includes an extra 16
bytes of my table data! This means that it _should_ include the whole
table if I just eliminate all the blank spaces!
Unfortunately it didn't work out quite like that. It included MOST of the
data but not all. 8(
VERIFIED that Devpac behaves the EXACT same way.
After removing the spaces the filesize from devpac went from 17568 to
23088. (It included more of the table data (5520 bytes))
* FINAL REPORT on Devpac Bug: As far as I can tell, it was only including
the FIRST data item on each line. I had 8 data items on each line so only
1/8th of the table was really being included. Thus when I rotated the
pentagram 45 degrees I was _really_ rotating it 360 degrees which would
explain why it looked so smooth when I reset to 0. This is all AFAIK.
* Reassembled the code using 1 number per line in the DC.W and now JCSin
and JCCos are working perfectly!!!!!! YAHOO!
* Added some extremely simple 3D rotation to the pentagram.
***** END PENTAGRAM UPGRADE ****
******** END HIGH-SPEED Vector Graphics Upgrade *************
******** END PART I *************
* Edited asm Getxy to save 2 cycles on 68000. 68030 cycle count unchanged.
* Edited asm AnimatorAsm to save 6 cycles.
* Disabled clipping on quadrascopes + quadspectrogram for small speed gain.
* Time to execute 100,000 DrawImage(FaunID) on 25Mhz 030 + 7Mhz Blitter
with clipping enabled 63 seconds
with clipping disabled 57 seconds (9.5% faster)
Time to execute 100,000 DrawImage(DarkPowerID) (Chosen because it has lots of color)
with clipping enabled 72 seconds (27.7 calls per frame)
with clipping disabled 66 seconds (8% faster) 25Mhz 030 + 7Mhz Blitter
Time to execute 100,000 DrawImage(DarkPowerID) to an unaligned memory location.
with clipping disabled 70 seconds (6% slower) !!! This means DrawImage
is terribly inefficient. If it was efficient then an unaligned drawing
would take 50% longer or more.
Time to execute 100,000 "Highlight a cell" on 25Mhz 030 + 7Mhz Blitter
with clipping enabled 118 seconds
with clipping disabled 97 seconds (19.5% faster)
Remember these speed improvements will be much greater on a 68000 because
it does math much more slowly and because the blitter is the same speed
on both systems.
* Disabled clipping during the AnimatorTask for about an 8% speed boost on
030 (should be at least a 24% speed boost on 68000) The A500 version
needs as much speed as possible. A mysterious blue line has now appeared
on the left hand side of the board to mark the edge. ??? I think my
Amiga has become sentient and is trying to help me design the game on its
own initiative. 8)
* OOPS! With no clipping, when you are using the drop down menus the
animated monsters overwrite them. Ok, I have sort of fixed this by using
the MENUVERIFY feature of the OS. Unfortunately there are so many
different places that handle IDCMP messages now that it is causing a
problem. I have only fixed the main HandleIDCMP routine for now.
SAI: This fix is what is causing problems to menus. See later.
* Ok, I have now modified all those keypresses that highlight cells to
temporarily disable the menus. EVERYTHING IS WORKING PERFECTLY NOW.
* REMEMBER THIS: The animator Task has proven itself to be safe therefore
it is disabling the OS clipping to get a speed boost. Therefore; we are
now using MENUVERIFY so that before any menus are drawn we can stop the
animator from running (to keep it from drawing over the menus). This
means any time you are going to parse messages from the IDCMP from "window"
You MUST be prepared to deal with this by either correctly handling
MENUVERIFY (see HandleIDCMP for an example) or just disable the menus or
just turn off the MENUVERIFY feature via ModifyIDCMP();
I know this is something of a hassle but this programming technique was
going to be neccessary eventually anyway for the day when I put in my
asm gfx routines which simply don't know anything about clipping or menus
or such things.
* REMEMBER THIS: Do not ever disable the OS clipping for any routine unless
you are ABSOLUTELY sure that it NEVER will EVER write outside the bounds of
the rastport.
* About, New, Quit etc. (things in menu.tex) should get a lock on the board
first to keep the animatortask from overwriting the display. FIXED.
* Changed xpixel[] and ypixel[] arrays to be arrays of UWORDS instead of
ints. UWORDS are faster and take only half the memory of ints. Adjusted
C + asm code accordingly.
* Disabled clipping in DoTheHighlighting() and Highlight() to get the 19.5%
speed boost.
* BUG: smake release version freaked out on alt-o in official level editor
due to backupboard not being allocated. FIXED.
* New option: smake demo. Allows us to manufacture a demo version of the
the game with no loading, saving or level editing.
* #IFDEF all loading and saving code.
#IFDEF'ed all calls to LoadInit, SaveGame, LoadGame and LoadLevel.
* #IFDEF'ed all level editor code.
* #IFDEF'ed all the file requester code in menu.tex.
* #IFDEF DEMO a check for turn 20 and quit the game.
* Removed io.o and editor.o from smake demo linking
* Attempting to edit, load or save produces the message "Removed from DEMO
version. Please register."
* CHANGED: The level editor is no longer mentioned anywhere in the docs or
the game due to the fact that it isn't completed yet, etc.
* Solved the mystery of accessing NEAR C variables from asm.
* Rewrote DoTheHighlighting in asm for a 9.28x speed increase. I want the
game to respond instantly to the player's commands.
* Old C DoTheHighlighting could only highlight 20.6 cells per frame (and
this speed includes the "turn off the clipping" trick.)
New Asm DoTheHighlighting always highlights 191.1 cells per frame.
9.28x faster! This should be a full 10x faster on most Amiga systems
because most Amigas have their graphics.library in the kickstart ROM but
my A3000 loads kickstart into FastRAM. ROM chips are very slow compared to
ram chips. Plus my fastram is compatible with Burst Mode CPU accesses
which I don't think any ROM chips support.
* Rewrote KeypressR() to use DoTheHighlighting(); so it can take advantage
of the enhanced speed like the other keypresses.
* Implemented Lissajous Squares Quit Menu thingy. I did this for the
following reasons:
1. I wanted to do a really kewl requester.
2. I am vaguely planning to play a different piece of music on each
requester in menu.tex; therefore, I need all the requesters to be
silent so as not to interfere with the music.
3. Amiga color-cycling RULEZ!
FEATURES:
1. Looks kewl.
2. 31 colors are cycled.
3. Just when you think it is going to shoot off the screen it arcs around
and comes back.
4. Fast.
5. Smooth.
6. Infinite variety. (Only the first one is the same each time, after
that they are randomly generated. Zillions of different designs.)
8. Utilizes Asm TestPixel, JCSin and JCCos.
* We can now turn on/off the color cycling of the lores screen with the
variable LoResColorCycling. e.g. LoResColorCycling=OFF; turns it off.
* Minor touchups on Setup Screen I
* Edited description of Reflector.
* Replaced "New Game" requester with Lissajous Squares version.
* Monday June 1, 1998 19:01:42 attempting a "smake demo" with stripdebug and
optimize. Finished 19:29:13 WOW! It took less than 30 mins on my 25Mhz
030! The optimizer reduced the max codesize from 305192 to 293044.
But the final filesize is 328608. Hmmm.... I guess that means we have
35K of graphics in the source code?
* Changed default spell list to 99. Thus anyone playing the demo version
will definitely see lots of spells that they never get a chance to cast.
hehehehe.
* Other miscellaneous bugfixes.
* Edited docs to include info about the demo version.
* BUGS: The Bonus Spell Window and the "Demo Over Window" are being
overwritten by the animator task. FIXED.
* Reduced the length of a demo game to 18 turns because I played a test
game and I won in about 15 turns due to Classic mode giving me lots of
tough creatures to squash the independents with. (I was controlling 2
wizards against 4 generators.)
I seriously considered reducing it to 16 turns but I just can't decide...
How long should it be? What is your opinion? 10 turns? 18? 15???
SAI: The demo needs to be long enough that people will get hooked onto
some of the more strategic aspects of the game. Therefore, I think
that it is ok to be able to win in demo mode. Maybe 15 turns would be
good.
* BUG: The demo version of the game crashes when you try to exit the
"Demo Over Window". Calling TerminateChaos is the problem. FIXED by
making a new function QuitChaos() that can quit the game without crashing.
Tuesday, June 2nd, 1998. I have made a smake demo of the game and played
it a few times on my A3000. Everything works fine. But when I put it on
an autobooting disk and try to play it on my A2000 w/68000 and OS 1.3 it
always crashes with a guru #00000000004 Illegal Instruction.
I thought this might be caused by the SASC optimizer bug but I have now
recompiled without the optimize parameter and it still does the same thing.
I can't find the autobooting version that I made back at christmas time. 8(
Do you still have it? Maybe I am doing something different on this disk
that is causing things not to work. I just don't know. The problem should
be one of the following:
1. SASC bug that is generating an 020+ instruction somewhere. (possible)
2. Devpac bug that is generating an 020+ instruction somewhere. (doubtful)
3. A68K asm bug that is generating an 020+ instruction somewhere. (possible)
4. Not really an illegal instruction but merely a wrong file on the
autobooting disk.
5. Not really an illegal instruction but merely a missing file on the
autobooting disk.
I am testing on an A2000 with 1 meg chip + 8 megs fast so I don't think
memory is the problem.
* OK I found the problem. I didn't have the "run" command on the
autobooting disk. Execute(); requires run to be in the c: dir.
Well luckily I only wasted an hour trying to figure that out.
Ok, now the intro isn't running... the fonts aren't loading...
3 hours later ... after much trial and error I have it all working, geez
I am going to hafta document this autobooting disk format for future
reference. Every time I make an autobooting disk I have these problems...
* Ok the game is now working on the 7Mhz 68000 but for some reason when you
select a team all the checkmarks on setup screen I are redrawn. This
totally stops the quadrascopes for a second...
* Observations about playing the game on 7Mhz 68000:
1. l key for line-of-sight is still too slow. It can take up to 3
seconds. The days of the 7Mhz 1978 68000 are at an end.
2. The r for range and m for move are nice and fast.
3. The s for shoot was somewhat adequate.
4. The quadrascopes move slower than what I am accustomed to. Its a
damn good thing I removed the OS clipping from them.
5. The Color cycling on the "new game" and "quit game" requesters is much
slower but this actually makes it look better IMHO.
6. The left pentagram blinks noticeably. So much for getting away with
no double buffering. The right pentagram is nice and solid.
* ChipRam availabilty for Chaos v2.3d on a 512k chipram system:
During the Intro: 55008 bytes free! yeah! We made it!!!!
During Setup Screen I: 63848 bytes free!
During main game: 256200 bytes free!
During Information panel: 242200 bytes free!
During Quit Requester: 205400 bytes free!
We are currently using 380k of fastram. (So v2.3f should be about 440k)
These numbers mean that as soon as I start work on the sound and music
upgrade the game will require 1 meg of chipram or more + 1 meg of fastram
or more.
* I have now tested this OS 1.2 Autoboot Disk on an OS 3.0 stock A1200 in
both ECS and AGA modes and it doesn't work due to incompatibilities with
the OS versions of various libraries and cli commands. We will have to
make a separate autoboot disk for at lest the 2 major versions of the OS.
******************** AUTOBOOTING DISK FORMAT ******************************
===========================================================================
* Documentation for making an Autobooting floppy disk version of the game:
The disk must contain the following files in the following directories.
They are ALL REQUIRED.
I'm not on the internet right now or I would download one of those nifty
dirtree utils. Oh well, I'll just include a complete directory listing.
The docs may be placed in the root directory along with an icon and the
"more" command if there is room for it all.
Directory "df2:" on Sunday 07-Jun-98
libs Dir ----rwed Tuesday 09:58:44
s Dir ----rwed Tuesday 11:02:11
c Dir ----rwed Tuesday 10:54:40
devs Dir ----rwed Tuesday 05:22:12
l Dir ----rwed Tuesday 05:23:30
Chaos Dir ----rwed Wednesday 02:18:06
Chaos.info drawer icon for dragging onto harddrive.
6 directories - 12 blocks used
Directory "df2:libs" on Sunday 07-Jun-98
diskfont.library 4964 13-Aug-88 For access to fonts.
translator.library 10592 13-Aug-88 For the computer voice.
req.library 18436 07-Jul-93 For the awesome filerequester.
2 files - 71 blocks used
Directory "df2:s" on Sunday 07-Jun-98
Startup-Sequence 158 -s--rwed Tuesday 11:02:11
1 file - 2 blocks used
Directory "df2:c" on Sunday 07-Jun-98
run 2568 30-May-78 for Execute();
assign 3008 30-May-78 to assign the Chaos_Game: path
FastMemFirst 976 --p-rwed 30-May-78 16:28:46
SetPatch 3844 30-May-78 for OS patches
Add36k 648 13-May-92 To save 36k of chipram.
cd 1756 30-May-78 To assign the Chaos_Game: path
avail 1964 --p-rwed 30-May-78 16:27:15
list 9972 --p-rwed 30-May-78 16:28:02
more 16912 ----rwed 13-Mar-78 10:34:23
9 files - 95 blocks used
list, avail and more are not required at this time. I just like to use
those commands a lot so I always put them on my disks. FastMemFirst isn't
strictly required either; I just figured it was a good idea.
Directory "df2:devs" on Sunday 07-Jun-98
System-Configuration 232 13-Aug-88 For default 80-column display
ramdrive.device 2128 13-Aug-88 for the RAM: drive
narrator.device 23280 13-Aug-88 For the computer voice.
3 files - 55 blocks used
Directory "df2:l" on Sunday 07-Jun-98
Ram-Handler 6464 13-Aug-88 for the RAM: drive
Speak-Handler 4216 13-Aug-88 for the computer voice
2 files - 24 blocks used
Directory "df2:Chaos" on Sunday 07-Jun-98
fonts Dir ----rwed Tuesday 10:17:13
Music Dir ----rwed Tuesday 10:26:42
Chaos 328764 ----rwed Wednesday 02:15:39
chaos.prb 6729 ----rw-d 14-Apr-98 20:37:19
classic.prb 6471 ----rw-d 14-Apr-98 20:37:20
pool.ssc 42319 ----rwed Monday 19:12:31
Start_Chaos 311 ----rwed 31-Mar-98 05:49:42
Start_Chaos.info 2566 ----rwed 31-Mar-98 05:49:43
chaos.dat 66368 ----rwed Monday 19:15:43
7 files - 2 directories - 901 blocks used
Directory "df2:Chaos/fonts" on Sunday 07-Jun-98
chaos.font 264 ----rwed 01-Apr-98 22:23:30
chaos Dir ----rwed 01-Apr-98 22:23:29
Union.font 524 ----rwed 31-Mar-98 05:51:22
Union Dir ----rwed 31-Mar-98 05:51:22
2 files - 2 directories - 9 blocks used
Directory "df2:Chaos/fonts/chaos" on Sunday 07-Jun-98
8 1724 ----rwed 01-Apr-98 22:23:29
1 file - 5 blocks used
Directory "df2:Chaos/fonts/Union" on Sunday 07-Jun-98
34 5972 ----rwed 31-Mar-98 05:51:22
70 21948 ----rwed 31-Mar-98 05:51:22
2 files - 57 blocks used
Both sizes of the Union Font are used in the game.
Directory "df2:Chaos/Music" on Sunday 07-Jun-98
Mod.ChaosTheme1 192226 ----rwed 01-Apr-98 22:38:40
1 file - 377 blocks used
TOTAL: 31 files - 10 directories - 1608 blocks used
The startup-sequence should look something like this:
c/add36k
c/SetPatch >NIL: ;patch system functions
c/FastMemFirst ; move C00000 memory to last in list
c/assign t: ram:
c/assign c: c/
c:cd chaos/
c:run chaos
******************** END AUTOBOOTING DISK FORMAT **************************
===========================================================================
I just played a test game of the demo version on my A2000 and at one point
a computer wizard was killed by a fire and the WizardExplode effect started
then the game crashed with a guru #000004.
I played another test game on my A2000 and this time the game crashed when
a bolter wall shot my wizard and killed me. The WizardExplode effect
started and then the game crashed.
This is quite strange because I've played several test games on my A3000
and I have killed lots of computer wizards with no crashes. I have even
killed several wizards on the A2000 and not had any crashes.
This bug is probably being caused by either
A: clipping is somehow turned off during the wizardexplode effect and when
the effect goes off the edge of the screen it crashes the game. But if
this were true then it should crashe EVERY time a wizard dies, not just
some of the time.
B: It is a bug that affects all wizards killed by fire or any human wizard
that dies in any way.
Never mind the above paragraphs; all is fixed now. Read next paragraph.
* BUG: game sometimes crashes when WizardExplode effect reaches edge of
screen. FIXED by getting a lock on the board while doing the effect.
This ensures that clipping is turned on.
* As a general rule, graphical effects should get a lock on the board just
to prevent graphics mish-mash. And they should get a lock on the board
in case the effect writes past the edges of the screen. If an effect
doesn't get a lock then clipping might at that moment be on or off.
Getting a lock ensures that clipping is in it's default state (ON).
* BUG: sometimes computer players get to move twice. Independents never seem
to be able to move twice though. This bug never seems to happen until
after some wizards have died. NOW FIXED.
* BUG: The speech always seems to work during casting phase but it seems to
only work randomly during movement phase. Hacking more changes to Say()
in an attempt to make this problem go away.
* OK I think I found the speech bug: an intervening use of text_store
between say() and waitforsay(). Tested and the speech is working 100%
now.
* Made various changes to print what is being said first, then actually
saying it. Thus you can read what it is saying for the 2 or 3 seconds
that it is saying it.
* CHANGED Aerial Servant and Combat to be CLASSIC.
* BUG: Spriggan speech doesn't work. Allegedly FIXED by removing the "2"
from the end of the speech.
* Speeded up TestPixel. Saved 4 cycles on 68000 or 2 cycles on 68030.
* TestPixel is now known as TestPixel4. It tests the first 4 bitplanes of
any rastport.
* Made new TestPixel1 Routine which only tests the first bitplane of a
rastport. I needed this routine for various purposes.
* Put in some checksums for lamer protection.
* BUG: Any errors in the early startup phase (e.g. it can't open a certain
file) result in a crash. NOW FIXED.
Now that I know we have enough chipram laying around...
* CHANGED: the default font for the game to be pearl.font (now included
in the fonts/ dir.) I did this for 3 main reasons:
1. Games which use the standard topaz font always seem "cheap" compared
to games which use their own custom font. It just somehow feels more
"commercial" when you play a game with a font different than the one
you are used to looking at all the time.
2. The lowercase i of Topaz sucks.
3. I have tested many, many fonts to find the one which is the easiest to
read. And pearl is it. I have had pearl.font as the default font on
my Amiga for several years now. It just makes everything easier to
read. _Especially_ 640x512 resolution text which is the resolution
that I run everything in. I realize that Chaos does not currently use
that high a resolution but I just tested several fonts a few mins ago
against pearl in 640x256 mode and I could still see the difference.
* SMOOTHED out the outlining of the Large font during the intro. The
outlining used to appear blocky on certain letters. Now the jagged edges
are rounded off. This has the drawback of almost doubling the execution
speed of FancyWriteText but the slowness will really only be noticeable on
the 7 Mhz 68000 and for UAE lamers. Oh well.... too bad for them...
* STUPID: Computer wizards cast Ball Lightning on a Generator which
already had 0 combat. NOW FIXED.
* STUPID: Computer wizards cast Demonic Touch on other wizards who only
had 1 combat point. NOW FIXED.
* ADDED: Stupidity checking for Shocker.
* IMPROVED: Stupidity checking for Archery.
* BUG: The "Wings" mouse Pointer and the "X" mouse pointer became
corrupted at one point. This was possibly caused by a wizard dying in the
upper left corner or by another wizard dying by being covered with a
growth. I _think_ I fixed this but I don't really know.
* BUG: FLAG_NOWIZARDCELL is broken. Wizards routinely cast spells like
Subversion and Betrayal, etc. on creatures which have mounted wizards.
NOW FIXED.
* BUG: That silly clipping bug has reappeared again! I don't get it. Now
the WizardExplode effect is not working again. Argh. It is drawing
Wizards all throughout chipram... they circle around over and over again
at an angle on the LoRes Screen and they bleed over into the HiRes screen
and they even pour out into the workbench screen and the CPR screen!
I have verified that
rastPortLayer and rastPort->Layer are somehow both set to 0 before this
function is called. ???? .... 3 hours later... Ok, I figured it all out.
I had made a change at the beginning of start.tex to derive the variable
"rastPort" from the lores screen. But doing that gives a pointer to a
rastPort with no cliprect and no layer information. We must derive the
global variable "rastPort" from the backdrop window (which is how you had
it set up all along until I changed it in ignorance of this behavior).
ALL FIXED NOW!
* The above fix has apparently made that mysterious blue 1-pixel line on
the left edge of the screen go away.
SAI: This line periodically appeared for me during my test games, but
I was unable to determine the exact circumstances.
JC: I think it is something do with layers.library and enabling/disabling
OS Clipping.
* STUPID: My allied wizard just cast a pool far away from himself and right
up next to his enemy's base camp. FIXED.
* STUPID: Wizards sometimes cast Magic Wood trees directly adjacent to
enemy wizards. FIXED.
* NEW FUNCTIONS: IsAdjacentEnemyWizard(Cell *), IsAdjacentTeamWizard(Cell *)
* LESS THAN INTELLIGENT: Computer wizards only cast castles directly
adjacent to themselves, they never cast castles across the screen to be
adjacent to one of their allies. NOW FIXED and totally cool.
* MAJOR BUG: I just moved my Aerial Servant onto a Mass Resurrect Scroll.
Then somebody justiced my servant and killed it and I guess it "reinstated"
the scroll. Anyway there is now a weird creature whose 3 frames of
animation are Lion, Dead Lion, Mass Resurrect Scroll. It's stats are
totally freaked out with numbers like 78 and -78. It eats Hydras, it's
Mountable Set 1 and it's a flying meditation growth that can attack both
living and undead creatures. Weird stuff. The mouse thinks it is a Mass
Resurrect scroll that belongs to me, therefore its movement bit doesn't get
cleared so I can't click on it and move it. darn. I didn't have time to
try to mount it. I wonder what would have happened? NOW FIXED.
* FLAW: I tried to cast my python on a Ghost scroll and it said "Cannot cast
on Creatures" rather than the more appropriate "Cannot cast on Scrolls"
FIXED.
* BUG: A Faun Scroll just put my Ghoul to sleep! FIXED.
* BUG: Dark Powering a snake that is standing on a scroll kills the snake and
makes the scroll disappear. FIXED.
* BUG: Creature died on scroll. Scroll was still there. I collected the
scroll and moved away but the corpse was not there anymore! THIS IS NOT A
BUG, JUST A LIMITATION OF THE GAME, sorry.
* BUG: snake stands on dead vampire. Justice Snake regenerates a living
vampire rather than an undead vampire. ERADICATED.
SAI: I actually knew about this, thought it would be a good trap for
young players :-)
JC: Yeah, I went back and reread this section a few weeks after I changed
this and I thought to myself: "Hmmm... maybe I shouldn't have done that?
Oh well, its done now." Should we make some sort of rule about this?
* BUG: Play a game with 99 scrolls. Start a new game. After ScrollDelay
turns NOBODY is awarded jillions of spells from many (but not all) blank
spaces on the board. Traced this to a problem in ClearBoard(); NOW FIXED.
* BUG: Generator Scroll just generated a Hydra. This was so hilarious that I
almost left this bug in the game... oh well, I FIXED it.
* BUG: I was riding a unicorn and I cast reincarnate on my unicorn.
I was surrounded by enemy monsters, they killed my unicorn and it
reincarnated into a spider then they killed the spider and it became
a beetle then a goblin killed the beetle and stepped onto the square!
I could still cast spells but I couldn't dismount the independent
goblin. This goblin also had an identity crisis; each turn when I
clicked on the "end turn" gadget; this goblin would attack independent
creatures for me all on its own. But when it was the
Independent's turn it would act like an independent goblin and attack
my creatures. I made a small correction to Reinstate() and tested it
so this is NOW FIXED.
* BUG: I killed 5 things with my WoodElf and it sure enough became a
DreadElf but it belonged to NOBODY! FIXED.
* BUG: I killed 7 things with my GreenDragon and it became an Emerald
Dragon belonging to NOBODY. FIXED.
* BUG: I killed 20 things with my RedDragon but it didn't give me a Vampire
Spell. FIXED.
* NOTICED: that due to all of our code cleanups, the Vortex no longer
leaves a trail of distorted space in its wake. I suppose this is for the
best. I guess we should change the spell description accordingly?
BUG: Trying to use the menus at the VERY beginning of the game before it
has time to say "Player 1" results in a machine crash. Leaving this one
for SAI.
SAI: I got a recoverable alert. I have been unable to fix this. I not
sure why it happens, esp. with the tick menus as they are completely
controlled by Intuition. Perhaps it is something to do with clipping?
Jeeps. It even does it if you just use the RMB and don't actually
select anything! May have found the problem, I was getting timeout
messages for window events---this is a potential memory leak.
No, I have now discovered this problem is caused by doing too many
ReleaseSemaphore operations. Somehow MENUVERIFY is not set at
this early stage, and therefore the semaphore never gets locked.
I have patched this problem by checking the semaphore status before
attempting to release it. This work, but it is technically illegal
because it makes an assumption about the Semaphore structure. Looking
at HandleIDCMP it badly needs to rewritten, even has a goto in it
at the moment! NOW FIXED
At the beginning of this next upgrade I had already made countless changes
to every source code file including lots of spell files and even msg.tex so
I went on ahead and made more changes by implementing the following:
***************************************************************************
***************** SOURCE CODE READABILITY UPGRADE *************************
***************** PART I: PROTOTYPES *************************
***************************************************************************
* Sunday: Completed Audio.tex through move.tex. I'll do the rest tomorrow.
* Monday: Completed through part of prog.tex then had to go to work. 8(
* Monday Night: Completed through start.tex then passed out.
* Tuesday Morning: Completed all .tex files + tex2c.c.
* Replaced all prototypes with complete versions.
* Eliminated several duplicate prototypes.
* Various other code cleanups.
No more Function(int,int,int,int,int);!
All prototypes replaced with the form of:
Function(int SourceX, int SourceY, int DestX, int DestY, int iterations);
***************************************************************************
***************** SOURCE CODE READABILITY UPGRADE *************************
***************** PART II: SYNTAX *************************
***************************************************************************
***************** NEW PROGRAMMING LANGUAGE: JC ***********************
***************************************************************************
I got sick of the lameness of C so I invented a new language called JC.
JC stands for "James' C", "James Conwell" and "GET THOSE GAWDAM FUCKING
PIECE OF SHIT LAME-ASS BRACES {} OUTTA MY FACE!" 8)
Have you ever wished C didn't have all those lame curly braces? {}
Then JC is for you.
Have you ever wished C had Array Bounds Checking?
Then JC is for you.
Have you ever wished C would properly indent your source code for you?
Then JC is for you.
Have you ever said "C is the greatest language ever. Its ease of use is
remarkable, its syntax is unsurpassed and its execution speed cannot be
matched by even the best assembly language programmers"?
Then you are seriously deranged and JC is not for you.
Here are the specifications for JC:
1. It is exactly the same as C, with the following exceptions:
A. Braces {} are only used to define Arrays and Structures, or in a case
block to create some new temporary variables.
B. You can use "and" or "AND" instead of &&.
C. You can use "or" or "OR" instead of ||.
D. IF statements end with END_IF and need not contain any braces {}.
E. FOR statements end with NEXT and need not contain any braces {}.
F. SWITCH statements end with END_SWITCH and need not contain any braces.
G. DO_WHILE(condition) blocks can end with LOOP or LOOP_WHILE(condition)
or LOOP_UNTIL(condition).
H. DO_UNTIL(condition) blocks can end with LOOP or LOOP_WHILE(condition)
or LOOP_UNTIL(condition)
I. Functions begin as usual with the type of return, name of function
and parameter list followed by the keyword FUNCTION which begins the
FUNCTION block. The FUNCTION block is terminated by the END_FUNCTION
statement.
J. You may have a WHILE condition or an UNTIL condition at the top of a
loop, the bottom of a loop or both via DO_UNTIL/DO WHILE and
LOOP_UNTIL/LOOP WHILE thus you can have a loop like:
DO_UNTIL (x<0)
blahblahblah();
LOOP_WHILE (z!=y and z!=1)
2. JC is easily transportable to every computing platform on Planet Earth.
(or at least those which have C compilers.)
3. JC has the option of properly indenting your source code.
4. JC has the option of generating additional code for Array Bounds
Checking. (Not yet implemented.)
Why is C so lame?
I could write an entire book documenting all the reasons why C is a lame,
obnoxious, crappy, primitive and barbaric language; however, I will only
write about those problems which are fixed by using JC.
I have wasted countless hours trying to debug large, complicated programs
which are very deep. "Deep" meaning deeply nested ifs within ifs within
elses within fors within switches right next to other ifs within fors with
elses within ifs within other switches, etc.
The reason for my wasted time is simple. The following symbol is nearly
meaningless "}". The close brace doesn't tell me jack about what is going
on in the program. It's definition is so completely vague that it makes
reading a program and debugging it very confusing. } means "end a block of
code". Well, whoop-dee-doo. What the hell kind of block is it
ending??!?!?!? _Which_ block of code is it ending?!?!??? You just don't
know. It could be ending a FOR block or a SWITCH block or an IF block or
an elseif block or an ELSE block or ...
In JC a FOR block is ended with NEXT. A SWITCH block is ended with
END_SWITCH. An IF block is ended with END_IF.
Thus when you look near the end of a large function instead of seeing this:
}
}
}
s=0;
}
}
}
You will be able to see some text that actually has real meaning.
IF you start a block of code THEN you must end a block of code. This is
logical, proper and grammatical. No more constructions like:
if (x)
Blahblahblahblahblah();
You should rewrite it to be all on one line or like this:
IF (x) THEN
Blahblahblahblahblah();
END_IF
This is absolutely neccessary so the JC syntax checker can verify that all
of your blocks of code match up properly.
If you don't put an END_IF at the end of your IF block then how will the
syntax checker know if all your IF blocks line up properly??? It will
think that you forgot it (which is the purpose of JC, to catch those times
when you forget something).
IF you start a block of code THEN you must end a block of code. This is
logical, proper and grammatical.
SHORTCUT exception: You may have SINGLE line IF statements where the ENTIRE
IF (condition) statement(); is ALL on 1 line. So you still have a shortcut
for simple IFs. This shortcut should OMIT the word THEN or it won't
compile correctly. Of course, all multiline IFs must include the THEN
keyword.
If you want your IF statement to use more than one line then you MUST use
END_IF. That is the rule. And it makes the program easier to read. And
it allows the syntax checker to find those obnoxious bugs in deep code and
it allows the JC formatter to properly indent your source code.
END_IF, NEXT and END_SWITCH should be located on a line by itself, as the
whole purpose of these keywords is to aid human readability and the only
way we can accomplish this is for the end block markers to stand out from
the crowd.
Here are some examples of C code vs. JC code:
C:
if (x) DoThis();
JC:
IF (x) DoThis();
C:
IF (x) {
DoThis();
DoThat();
}
JC:
IF (x) THEN
DoThis();
DoThat();
END_IF; <--- Semicolon optional.
C:
IF (x) {
DoThis(); DoThat(); DoTheOther();
}
JC:
IF (x) THEN
DoThis(); DoThat(); DoTheOther();
END_IF
C:
IF (x){
DoThis();
DoThat();
DoTheOther(parameter1, parameter2, parameter3, xyzzy, plugh, parameterZ, weird);}
DoSomethingElse(blahblah);
return(returnvalue);
JC:
IF (x) THEN
DoThis();
DoThat();
DoTheOther(parameter1, parameter2, parameter3, xyzzy, plugh, parameterZ, weird);
END_IF
DoSomethingElse(blahblah);
return(returnvalue);
C:
switch (code) {
case 1:
blahblah();
case 2:
blahblah();
}
JC:
SWITCH (code) <--- Notice there is NO brace! {
case 1:
blahblah();
case 2:
blahblah();
END_SWITCH // (code)
Given that over 95% of the Earth's literate population does not know what
"&&" or "||" mean; it utterly boggles the mind to try to conceive why C uses
"&&" to mean "and" and "||" to mean "or". Over half the world's literate
population knows what "and" and "or" mean, and 100% of the Earth's
English-Speaking population knows what "and" and "or" mean.
Given that the & is used to derive the address of a variable, to logically
and bits together AND to mean "and" in the case "&&" we can see that the &
is really overused so && has been replaced with "and" in JC.
Ditto for || and "or".
Of course now that I have been seriously coding in C for 1.5 years and
occaissionally coding in C before that; I am now used to the && and ||.
However, I would have learned C years before if it had used standard "and"
and "or" notation.
Implementation in Chaos:
Since Chaos already transforms the original source code into real C code
via tex2c there is no reason not to expand its functionality to trasform JC
source code into plain C source code. As it transforms the code it will
perform error checking to make sure that your NEXTs match with FORs and not
with an IF or a SWITCH, etc. The code will also be properly indented.
Major problem discovered with C macros:
FOR(i=1,j=1;i<=wizards[p].BonusArrayPointer;i++,j++)
The FOR macro won't work in the above example due to the , (comma) meaning 2
different parameters. So we must find a way to make a macro work with any
number of parameters. Either that or JC will have to preprocess the files
like tex2c does.
Or I could just rewrite the FORs to have i=1; j=1; right before the FOR.
NO that doesn't work because there is still i++,j++ at the end.... hmmm...
Changing FOR to take 10 parameters doesn't work either. The macro wants
EXACTLY the number of parameters that have been defined for it.
Due to lameness in the C preprocessor there is no way to #define a macro
whereby EVERYTHING within the parenthesis () is considered to be just 1 big
parameter; therefore, I cannot implement FOR NEXT loops in a simple manner.
I must either preprocess the code and translate from the source file to a
new file or I can make up a DO keyword and continue to do everything within
tghe confines of #define statements. The latter course of action is being
taken at this time. So a FOR NEXT loop must look like this:
FOR (x=0;x<25;x++) DO
blahblahblah();
NEXT
Sorry about the above inconvenience.
Luckily much of the work of implementing JC can be accomplished with clever
use of #define macros.
This has the advantage of working perfectly with the C debugger.
ARRAY BOUNDS CHECKING has not yet been implemented. I have worked out the
basic algorithm for implementing it but I have had numerous personal
problems with work, my car breaking down and I had to move to a new house
then I got sick, so I have accomplished very little in the last month.
Therefore I will implement the array bounds checking either A) When it
becomes extremely important or B) whenever SAI has a lock on the gamecode
and I have nothing better to do. In the meantime I will begin implementing
things which I hope are more important and more fun.
*****************************************************************************
**************** END NEW PROGRAMMING LANGUGAGE: JC **************************
*****************************************************************************
* Test Macro(x) vs. Macro (x) Will it work? YES!
* Thursday morning: Upgraded Audio.tex to new JC syntax Then had to go to
work all day.
* Friday morning: Upgraded Bonus.tex to JC.
** BEGIN 3 days off:
* Saturday Morning: Upgraded Cast.tex to JC.
* Saturday Evening: Upgraded Cell.tex to JC.
* Sunday Morning: Upgraded cmove.tex, core.tex, graph.tex, part of editor.tex.
* Sunday Evening: Upgraded info.tex, init.tex.
* PLAYED a test game: Everything basically works ok.
* Monday Morning: Upgraded menu.tex and move.tex to JC.
* Monday Evening: Upgraded msg.tex, pointer.tex, pool.tex (lots of editing
to the tex of pool.tex.
* Played a test game: everything seemed to work ok, but at some point the
Independents had a score of -11. How is that possible?
* Upgraded pool2tex.tex and predicate.tex to JC.
* Tuesday Morning: Upgraded 75% of prog.tex to JC then had to go to work.
** END 3 days off 8(
* Wednesday Morning: Finished upgrading prog.tex. Finally!
* Thursday Morning : Upgraded score.tex to JC.
* Friday Morning: Upgraded spell.tex to JC
* SUSPICIOUS: I noticed some code in IntelligentComputerSpellSelect() that
disables the .necro or .forgot but there is only 1 chance in 32 of it
happening. There is similar code in GetSpells()
Begin 3 days off:
* Saturday morning: Upgraded start.tex, text.tex, warp.tex, flashywin.c to JC.
* Played a test game: Everything seemed to work just fine except for:
* BUG: when a creature ends it movement the "Range = X" line of
WriteNearBottom is not erased. FIXED.
* BUG: I was playing a game and there were no indpendents left alive.
After I went the computer said "INDEPENDENTS" and them immediately started
making lots of bonus spell noises and stuff. This was caused by the
awarding of bonus spells from manabatteries etc. So there needs to be
some sort of notification that the game is processing the update phase and
is NOT still doing the Independent movement. FIXED.
* BUG: The Repulsion spell does not repel scrolls properly. Sometimes there
is a cell which contains nothing while the underpart contains the scroll
that used to be there. This results in NOBODY collecting lots of free
scrolls from empty cells. FIXED.
I intentionally skipped over SPELLMAN.TEX because AFAICR I
havent made any changes to this file. I'll try to leave it untouched in case
SAI has made any changes to it during the past 2 months while we have been
out of communication.
* Saturday Evening: Upgraded io.tex to JC.
* Sunday Morning: Upgraded editor.tex to JC. YAHOO! All main program files
are now upgraded to the new syntax!
* As I was upgrading all of the above files I corrected several places
where an else appeared to be associated with a particular if based on its
indentation but in fact was associated with a completely different if.
I fixed them as I noticed them. I left millions of other indentation
errors for the JC formatter to fix automatically.
* FLAW: Abduction spell abducts artifacts then the artifact owners are
immediately recalculated in the update phase so the net effect is nil.
NOW FIXED: Abduction no longer targets artifacts.
BUG: I somehow did the menus too fast for the editor and the game sort of
locked up. I couldn't get the menus to work anymore. I was stuck and
unable to do anything. Leaving this for SAI.
SAI: Probable symptom of ReleaseSemaphore in the wrong place. Or else
a double Obtain if two consecutive Obtains.
* I only upgraded the first 2 spell files (Abduction & AcidRain) to JC.
I will either leave the rest of the spell files for SAI or I'll do them
some other time. Right now I need to work on the formatter.
Sunday:
* Joseph came over and we played a test game
* BUG: Plasma Beam locked up the game. (oops a misplaced END_IF) NOW FIXED.
* Put in some simple IFs to reduce the intensity of the background color
on lissajous squares but this seems to have completely stopped the background
color cycling 8(
* COOL! I FINALLY found the bug in my lissajous background color cycler!
Now it does more or less what I had intended it to do!
Monday:
* Banged together a simple JCformat proggy. Doesn't have any really fancy
features yet. Doesn't handle everything.
End 3 days off. 8(
Tuesday: Work on car. Go to work. 8(
Thursday July 2nd, 1998: My psychotic bitch mom STOLE my car and now I can't
go to work! I was supposed to work all day today and make $100.00. I will try
to do some programming but I am so upset I doubt I'll be able to concentrate.
* SUCCESSFUL TEST: I used JCformat on chaos.c and near the end of the
program I noticed that the indentation was off. This is what happens when
something is mismatched... In this case it was an IF-THEN-END_IF problem.
So even without strict alignment checking, the formatter can "detect" and
show you where code structures don't match up by the fact that the
indentation is OBVIOUSLY wrong.
* SUCCESSFUL TEST: JCformat on flashywin.c like this:
JCformat flashywin.c flashywin.jc
This produced a perfectly indented file that looked great to the naked eye.
I then tested it with:
diff -w t:flashywin.c t:flashywin.jc
NO DIFFERENCE reported.
Then I did JCformat t:flashywin.jc t:flashywin.jjc
(I formatted the already formatted file)
cmp t:flashywin.jc t:flashywin.jjc says "Files Compare ok".
So they are byte-for-byte identical.
* REPEATED ABOVE TEST on chaos.c. Works perfectly! YAHOO!
Well, here's the deal: I've used 2 character indentation on all my zillions
of TrueBASIC programs over the years and I loved it. 2 characters is the
minimum amount to be easily seen by the eye and it keeps my program
listings from going off the edge of the paper in those deep nests with long
lines in them. I really like 2 character indentation because I like all of
my lines to be 140 chars or less because that is what I like to print my
programs out at. Sometimes I use 160 characters per line (Courier 6
point).
But the Chaos source code had many places with 4 character indentation and
some blocks of code had 6 characters of indentation! So switching from
that much indentation to only 2 chars seems like a bit of a shock and it
seems harder to read. I honestly don't think it _is_ harder to read I
think it just _seems_ that way because we are used to something different.
Anyway I am breaking with tradition and using 3 chars of indentation as the
standard default. This should be an ok compromise I hope.
If you don't like it you can always reformat it anyway you like. It only
takes a second to reformat a file.
Consider BEGIN_STRUCT and END_STRUCT macros.
Consider DO_FOREVER and LOOP_FOREVER macros.
* PATCHES INSTALLED: I have downloaded all the SASC patches
from Aminet and have installed them:
sc655pch.lha biz/patch 1.0M 176+SAS/C V6.55 bug fix for Amiga SAS/C 6.50 and SAS/C 6.51.
sc656pch.lha biz/patch 191K 144+SAS/C 6.56 Patch (requires 6.55)
sc657pch.lha biz/patch 595K 89+SAS/C 6.57 Patch (requires 6.56)
sc658pch.lha biz/patch 668K 49+SAS/C 6.58 Patch (requires 6.58)
* SCREWEY BUG ELIMINATED: Now that I am using the latest version of the C
compiler that screwy bug that prevented us from compiling init.c with
optimize=on has disappeared! YAY! Now that I am compiling init.c with
optimize=on (for smake release) it is saving us 728 bytes on the
executable filesize!
*****************************************************************************
**************** SOURCE CODE READABILITY UPGRADE **************************
**************** PART 3: DEBUGGING **************************
*****************************************************************************
Problem: When looking at the code in the debugger it looks completely
different from the real source code due to the fact that all the cool tex
comments have been stripped out.
Problem: Errors during compilation are reported at line number x, which has
no relation to the line number of the source code due to the fact that all
the cool tex comments have been stripped out. Thus the line number given
is often 100+ lines wrong.
Since it is highly desirable to be able to see the program documentation in
the degubber while debugging, we must not strip out all of our tex
documentation.
Solution:
1. The tex will no longer be stripped out.
2. tex2c will no longer be used.
3. A seperate program, c2tex can be used to generate a tex file.
(Leaving the coding of this proggy to SAI but it will be easy.)
4. Edit all makefiles to eliminate the use of tex2c.
5. Change all occurences of
\section to /*\section
\end{verbatim} to /*\end{verbatim}
\begin{verbatim} to \begin{verbatim}*/
6. No more .tex files used in compilation. Only .c and .h files.
Thus all tex documentation will be embedded in C comment blocks. Thus there
is no need to strip it. Thus we can read it in the debugger.
This has the side effect of making the source code take less drivespace,
since there is only 1 copy of each source file, rather than 2 copies.
* Transformed and eliminated audio.tex, bonus.tex, cast.tex, cell.tex,
cmove.tex, core.tex, editor.tex, info.tex,
Upon recompiling init.tex I found a horrible bug that crashes the game
every time. I checked some old versions of the code (2.2 and 2.1) and the
bug has been there for ages. Funny how it never crashed the game till now.
Anyway, it is FIXED now.
Transformed io.tex, menu.tex, move.tex, msg.tex, pointer.tex,
predicate.tex, chaos.tex, score.tex, spell.tex, start.tex, text.tex,
warp.tex.
As a result, numerous files which were once combined together into large
.tex files are now their own standalone file. e.g. edmenu.dat, menumaker.c,
and others.
* I didn't convert pool2tex.tex, graph.tex or pool.tex yet since I
presumably don't have to debug those and I am anxious to get back to some
real coding.
* INSTALLED MUNGWALL & SUSHI: I was having a nasty random bug in JCformat
so I installed MUNGWALL & SUSHI to try to find it. It showed me the bug on
the 1st try. I was writing 1 byte beyond the end of my allocated memory.
*****************************************************************************
**************** END SOURCE CODE READABILITY UPGRADE ************************
*****************************************************************************
Jerry came over and we played a game that lasted all night long. We each
made our fair share of good and bad moves throughout the game. For most of
the game Jerry had been winning like crazy. This is partly due to the fact
that I waited and waited and waited till the last possible moment to use my
Invert spell then things started to change. A few turns later and I was
definitely winning. I could have won the game but then I got tired and
made an INCREDIBLY stupid move. My wizard was in a tree and the tree
collapsed. I had Magic Wings with 5 movement and LOTS of safe places to
move to. But instead I hopped into the next tree. BAD MOVE. The next
tree only had *1* life point and my wizard had only 10 life points. And
seeing as how that 1 particular square was one of the few on the board
where Jerry could attack me with 2 creatures at once. I got killed. Darn.
My Iridium horse had been really kicking some ass....
I wouldn't have died if it hadn't been for the fact that Jerry had control
of the only artifact on the board. If not for that artifact my last move
would have been nothing more than an insignificant mistake. But as it
happened I got killed. This is the 2nd human vs. human game I've played where
artifacts were directly responsible for the outcome of the game.
We played with 4 buried scrolls and 4 buried artifacts with scroll delay of
3. No Texas Trash'em. 6 computer wizards.
Every scroll we dug up was something really cool. I dug up an Iridium
Horse Scroll and a kill scroll. Obtaining the scrolls was quite
challenging because it took several turns to dig them up and then 3 more
turns to collect them.
One interesting event in the game occured when a mounted computer wizard
cast a Shadow City next to himself but refused to enter it. My wizard had
magic wings with 5 movement points + Elf Boots + Combat + Recover Boost
so I immediately began to cross the entire board to get there. It took 5
turns to make it inside the Shadow City. I took a lot of damage along the
way. My brother thought I was crazy for charging my wizard off like that.
It ended up being well worth it. I got to pick 3 great spells from a list
of 10! Awesome!
There were several turns in the game where I had to REALLY strategize
seriously in order to keep my brother from running me over.
Jerry cast a Tempest which really made the game exciting. First it came at
me and charged into my group of creatures and scattered them out one by
one. Jerry then used his group of creatures to kill them off one by one
since they had no backup and were isolated from their buddies. This left
me VERY weak.
But a few turns later and the Tempest went into Jerry's territory and
started scattering his creatures in a similar fashion so this evened things
up somewhat. What a great game.
Here are the bugs we found:
Jerry cast a cat lord and the cat lord immediately cast a Jaguar but the
Jaguar allegedly never moved (several turns) till Jerry killed the Cat Lord.
The cats which were already on the board when the Cat Lord was cast all worked
like they were supposed to. They moved around and killed things, etc.
Unfortunately I didn't pay that much attention to it. I think the Jaguar
may simply have been sitting by a pool the entire time.
SAI: I find this very hard to believe. Most likely the computer just
decided there was no benefit in moving it.
* TEMPEST BUG: Jerry cast a Tempest whose Life Force and Recovery and Combat
kept mysteriously rising. Furthermore, it managed to accumulate several
Foes Killed every single turn even though it never killed anything. And
this happened whether it teleported something or not. By the end of the
game it had 54 Foes Vanquished.
Ok I have determined that Tempests were "killing" every empty cell that
they moved onto and they were also "killing" every dead body that they
were moving onto. Presumably, killing an empty cell was its favorite
food and that is why its stats were raising so high.
TEMPEST BUG FIXED.
* BUG: Sleeping Tempests could still move. FIXED.
* IMPROVED SCROLLING: Due to a misunderstanding of arcane timing lore, the
scrolling of the screen in the intro was, in fact, only executing at 25 fps.
It now runs at 50 fps for faster, smoother operation. Unfortunately, the
scrolling jerks a little bit each time the OS does something for 1 frame.
* SCROLLING now at priority 50. This fixes the above occaissional glitches
for nearly all situations.
* INSTALLED ENFORCER in my User-Startup so it will always be running from
now on. "enforcer stdio"
* Paid $165.00 for a unix shell account for 6 months. They then REFUSED to
send me any info about how to access my unix shell account. But they did
tell me how to get into my ppp account. I have asked them repeatedly and
they simply will NOT tell me how to access the unix shell account. Damn
bastards. I have spoken to some people who do not work for this ISP and
they are of the opinion that the unix shell account CANNOT be accessed
without first logging into the ppp account! ARGH!!!!
* NEW HARD DRIVE purchased and installed. It is a 4.3 gigabyte Quantum
Fireball SCSI drive that cost me $300.00. I now have ROOM! YAY!!!
I can actually _install_ software on my Amiga!!!!!! Coolness!
* INSTALLED MUI 3.6 + Miami 1.1 + AmFTP 1.89a and everything worked great on
the first try! However I was having probs with ftp transfers so I upgraded
to the following:
* INSTALLED MUI 3.8 + MIAMI 3.0 + IBROWSE 1.2 + AmFTP 1.89a + WorldNews1.0.
NOTES: Hotmail won't let me send attachments with Ibrowse.
Miami 3.0 is MUCH more difficult to install than 1.1 was. 8(
Installing all this new software made no difference to my ftp
transfers. Every ftp site on earth seems to work perfectly
except for 1. It just doesn't work right no matter what I do.
Luckily this is irrelevant.
* I am now on the net with a ppp account. This sure makes uploading and
downloading a lot easier.
I still need to install an Email proggy.
I still need to install Directory Opus Magellan. It is supposed to be the
ULTIMATE piece of software. It is supposed to be the BEST for ftp and the
BEST for viewing and adding/deleting files from/to compressed archives and
millions of other things.
* Put in 3 different MeltScreen effects. There is a problem in knowing how
to redraw the right hand side of the screen after this effect.
I don't know how to solve this.
* Biohazard now uses the MeltScreen(SINK) effect.
List of spells that might go well with the MeltScreen effect.
*meddle, mutate, *dissection, acid rain, disrupt,
I want to use MeltScreen(SUCK) with devastation but I don't want the screen
to be redrawn until after all the appropriate cells have been
killed/reinstated. So how should I do this?
A) add a REDRAW option to MeltScreen. Then call MeltScreen(NOREDRAW) then
manually redraw the screen in the .spl file.
B) add a "function to be called before the redraw is done" option.
If this function address is not null then it will be called before any
redrawing is done.
I implemented option B but then I realized that this wouldn't work because
the spell handler needs access to some variables so I am making all those
variables STATIC and moving CastFreeSpell and CastMagicSpell near the end
of cast.c. I couldn't think of any disadvantages to doing this. (Not that
my judgement is any good right now since I am still extremely sick at the
time of this writing.)
This now means that we are 1 small step closer to being able to have
seperately compiled spell handlers since each spell handler can now be its
own seperate, independent function with access to all the game's global
variables + these few semi-global (STATIC) variables such as id, player, p,
b, wizardsp, wizard_cell and w_stat.
I am not saying that we 100% want the capability to have seperately
compiled spell files but it would be nice to have that _option_, should we
decide that it is desirable.
* Devastation now uses MeltScreen(SUCK)
I didn't pick a spell to use MeltScreen(SWIM). I'll leave this for SAI.
* WaveScreen effects: You can now make the entire screen wave with
StartWavyTask(screen,1); Small numbers mean more radical waving. Larger
numbers mean very gentle waving. I implemented this as its own task
because this effect can be used WHILE WE PLAY THE GAME AS USUAL. Kewl!
Of course if you don't want it waving the screen in the background just
do: StartWavyTask(screen,1);
WaitTOF(80); // wait however long you like, set vars, call functions, etc.
StopWavyTask();
In general we will want to use the WavyScreen effect in the above manner.
But for Vodka spell I want the effect
to last for the entire duration of the afflicted player's turn.
I am not in "graphics design mode" right now so I leave the
graphical design of the above spell to SAI.
Here is roughly how it works. You cast the spell on a player.
This sets the appropriate wizard bit ala BattleCry etc.
At the beginning of the afflicted person's movement phase we
StartWavyTask(screen,2);
If the drunkeness bit is set then all his creatures do only half
damage. (Just modify the combat routine to check for that bit and then
>>1 the damage.) At the end of his movement phase just StopWavyTask();
and clear the drunkeness bit. VOILA! 8)
This effect normally doesn't take many cpu cycles, however since we have
2 visible screens on our display it probably slows down the computer
noticeably.
However it DEFINITELY does not slow down the computer any to wave a 64
color screen instead of a 2 color screen. Either way the screen waves
instantly on command due to the power of the copper.
* Bless and Haste now utilize the WavyScreen effect.
Doing the screenwave effect + the screenmelt effect simultaneously looks
extra gross in a horrific sort of way.
???? I just edited the description of Arborist and saved it. Then I did
smake newspell. But the game is still using the old description! 8(
spells.tex has the new description but the game doesn't!
pool.ssc is dated June 30th, 1998. This is August 24th. pool.ssc hasn't
been updated all this time! 8(
In an attempt to fix above problem I threw the following lines into the
makefile: (SAI should look at the makefile to see if it is in correct order.)
pool.ssc: pool.txt sencode.o
sencode <pool.txt
ok, that didn't work. I'll leave this mysterious matter to SAI. I just
don't know what all these different things do (sencode, decode, ae, ad,
single, fixfreq... AUGH!!! I guess I really broke something somewhere.)
SAI: ALLEGEDLY FIXED this problem.
Made various other changes to the makefile but no luck. 8(
Dear SAI: How about whipping us up a green square Image and a pink square
image so that we can show damaged movement on the info screen similar to
the way all the other stats are shown? Thanx. (remember the colors on the
hires screen are different from the colors on the lores screen.)
SAI: Modified DrawSquares so you can use any HIRES screen colour that
you wish. DONE
* Reduced the probability of Bipedal Generators.
* Changed NOLOADORSAVE to be NOLOAD and removed the appropriate #ifdef NOLOAD
references from the code. This way the demo game can be played and
saved. Then when they get the registered version they will allegedly
be able to load in their saved games and continue.
* FLAW: the 2nd menu strip (CONTROLS: Speech, Sound, Impurities etc.)
does not highlight correctly. This dates all the way back to v1.0
FIXED.
* FLAW: Something about the game that has always really bothered me is
that there was no way to know what turn it was. Grrr... When I play
a long long game I have no idea how many turns I've played. I like
to know what turn it is so that I know about how many spells I have left
and because sometimes I play a ridiculously hard game just to see how
many turns I can survive. FIXED. The turn # is now displayed on the
Scores Screen.
* ADDED the saving of TurnCount into the header block of io.c so now
the Turn number is properly saved and loaded.
* BUG: I killed a Bird Lord with my mounted hourse and it was promoted to
a Nightmare then immediately to an Iridium Horse. FIXED.
However, the IsDragon macros automatically report all mountable
set 2 creatures as dragons. Therefore you can promote a Thundermare
by killing Bird Lords, T-Rexs or Elephants, as well as real dragons.
SAI: I think this is acceptable.
JC: It's ok with me too.
Nothing of consequence done during september.
Absolutely, literally NOTHING done during October and November.
Too busy with work, fixing car, girls.
* Thanksgiving day playtesting. Jerry, Joe and JJ learned the hard way
that if player 1 casts an alliance spell on player 2 then player 3 casts
an alliance spell on player 2 that the first alliance is severed.
We never knew that it worked like that. We should probably figure out
some eloquent way of saying this in the spell description.
* Installed YAM1.3.5 for direct email contact between JJC and SAI.
Hotmail has grown progressively worse ever since Bill Gates took it over.
It just kept getting worse and worse until finally it just plain stopped
working a few weeks ago. I now use YAM for my "real" Email but my
new permanent address is JamesConwell@yahoo.com
Since the makefile seems to change every time we swap the code around,
Maybe we should just forget about smake unarchive and just make a
fresh dir for the game each time we swap control and
"lha x" it then just do a "smake dev". That will guaranteed work
so long as we don't forget to include any files in the archive.
* TESTED
1. smake archive
2. put the archive in a virgin dir and lha x #?
3. smake dev
WORKS ALMOST. ALL FILES PRESENT AND ACCOUNTED FOR EXCEPT for
fixfreq isn't getting recompiled by the makechaos file.
I guess the dependencies are in reverse order or something.
Leaving this for SAI to fix. NOW FIXED
* I just burned a floppy version of Chaos 2.3df and the disk is
100% FULL. Looks like I cut it real close. Good thing I eliminated
all that code and did all those optimizations. Every little bit
actually ended up making a difference.
* UPLOADED version 2.3d to Aminet.
December 1, 1998: ReleaseSemaphore(&SourceCode) by JJC
END OF VERSION 2.3
BEGIN VERSION 2.4
* Fixed printf format bugs in sm.c, pool.tex.
* Made sm, reincalc, work under Unix.
* FIXED the problem with the generation of the "rein.h" file. I was
deleting the file before it had a chance to be used. The program
"reincalc" is only used to produce a table of reincarnation numbers
for inclusion in the manual.
* FIXED type errors in decode.c, sencode.c, and graph.tex
* Stopped "graph.tex" from including inutition.h unnecessarily.
* Allegedly fixed menu recoverable error problem. This fix is not
to my satisfaction and I will try and find a better solution. NOW FIXED
* Allegedly fixed the makefile problem with generating pool.ssc.
* REMOVED sound effect from BioHazard.spl (I don't feel this was
necessary with the new screen effect).
* CHANGED: The eye-eye powerup now only gives 2 counts instead of
5, but its effect can now be accumulated by casting the spell
multiple times.
* Added MOUNTABLE2_STAT to the Shadow Dragon.
* Modified DrawSquares in info.c so that we can draw squares in any
colour.
* Modified the movement and range stats to show the original value
in red (i.e. like all the others stats) and the current value in
green. I didn't do anything about recovery for movement.
* Added a few new random messages for wizard spell selection.
=== Improvements to JC language ===
* ADDED support for DO_FOREVER loops to JC (replaces DO_WHILE(1))
* Added formatting for multiline /* comments. All such comments
will now appear thus:
/*
blah blah blach ................................... black heep
toxic fumes kill wizard blah blah bvlah
*/
That is, the /* and */ appear on lines by themselves. The text
in the comment is automatically word-wrapped at 75 characters
(taken accounts of spaces of course). New paragraphs can be
forced with two returns (as in most of our files). Finally,
lines starting with * in a comment are passed through as is.
This allows for lists to go through without formatting errors.
I would have liked to indent the comment text a couple of spaces
but I couldn't think of any easy way of doing this using my
curret strategy.
None of this affects /*-style comments on a single line.
Someone still needs to do something with // style comments.
I suggest that if // is the first thing on a line, then that
line should be indented with the current indentation.
I haven't test this on every file yet, so there might still
be a few problems.
Note from JC:
The above strategy has some unfortunate flaws.
1. It destroys my "outline style comments"
2. It destroys blocks of code which have been temporarily
commented out.
3. Most comments are already properly word-wrapped.
4. You can word wrap a paragraph in Cygnus Ed Professional by simply
placing the cursor at the start of the paragraph and selecting
format from the menu. You can format with or without fill.
Therefore: I am changing it so that the auto word-wrapping
ONLY happens on blocks of code that start with /**
Hopefully that is good enough. Perhaps we should make it /***** or
something?
* NOTE FOR JAMES: NULL, 0, and '\0' are three diffrent concepts
and it is just by chance (design?) that they have the same
value on most platforms. I have used computers where NULL!=0
(VAX 370 for instance). Futher NULL is a 32-bit quantity
on the Amiga, whereas '\0' is only an eight bit quantity.
More sophisticated compilers will complain about incorrect
usage.
Therefore please use NULL only for pointers and '\0' to
mean the nul character. At the moment you often use 0 for
this function. Further it is better to write '\n' than
10 for end-of-line since code using 10 will fail under
DOS, Cray, or Mac because of different line-ending
conventions. Using '\n' should work for all platforms
(POSIX standard).
* Added a few extra bits of code to JC-Lang so that it will work
under a standard Unix environment. I needed this because I
often test chaos stuff under Linux. A good reason for this
is that make/gcc on Linux can churn through the entire
spell-manager part of building in Chaos in under 15 seconds,
yet this takes about 30 minutes on my Amiga.
JC: You are racing a 1997 linux CPU against a 1987 Amiga CPU.
The 68030 was introduced in 1987.
* I think we should completely phase TeX out of the source code
now that we have a decent automatic formatter. ??
JC: I don't care if we "phase TeX out" or not, but I would
like it if you phased out the other .tex files so that all files
are real code files.
* RENAMED: JCformat.jc to JCformat.c for Unix compatibility.
* ERROR: Just discovered Intuition defines a looping structure
using FOREVER. Therefore I have renamed the JC equivalent
to DO_FOREVER. If only the Intuition one had a { at the end
of the definition all would have worked fine!
=== end JC-Lang improvements ===
* Removed all .obe files from the game. Created .raw files for
those .obe files which did not have .raw files. This saves
a fair bit of space in the development directory, and archive
file although makes no difference to the compiled program
size.
* Modified the info panel so that creatures having the REIN
bit set, show the number of reincarnations steps remaining
in their sequence (previously just an `R' was shown).
=== Start of input handler upgrade ===
* Completely rewrote HandleIDCMP with the aim of making it the
sole place in the program to handle IDCMP events; although
I have not yet incorporated the editor functionality into it.
In the process I eliminated a few horrid global variables,
I wish I could get rid of more of them.
There should no longer be any menu selection problem.
There should be less lossage of meaningful events.
Return to end your turn now works much better.
Various highlighting functions are more homogeneous.
The mini-editor is still supported.
* Moved various bits of JC's timing code to the bottom of
the chaos.c file since I didn't want them cluttering things
up while I was doing the new logic.
* Hmmm. Discovered that the existing editing functions are
already using some routines from chaos.c and now there
is a conflict. Oh well, have temporarily turned those things
off in the editor. NOW FIXED
* Incorporated the editor IDCMP handler into the main game
handler, thus moving the one step closer to a single IDCMP
handler. In addition this change shaved 500 bytes on the
size of the code segment.
* Discovered I had accidently deleted the code for the `S' key.
Reinstated it.
====== End of IDCMP upgrade =========
* Modified the image tool to use only raw files. Took the
opportunity to fix all the prototype error messages as well.
* Repaired the Quit option on the initialization screens.
WELL I'M OUT OF TIME. So back to JC.
NOTE: I haven't tested the modified JC formatter as much as
it should have been.
December 24th, 1998: ObtainSemaphore(&SourceCode) by JC:
unlha'ed the archive in a fresh dir and then did smake dev.
This produced a game that did not work due to no pool.ssc file having
ever been created. Ok, I dug around and studied the fixfreq and sencode
and I understand what is going on now.
pool.ssc must be recreated when doing smake anything and pool.ssc does not
already exist.
pool.ssc must be recreated when doing smake clean
pool.ssc must be recreated anytime that pool.txt is newer than pool.ssc
I'm not really sure exactly how this should be put into the makefile.
I just hacked something in and it didn't work.
Tried various different things and I just couldn't get a smake dev to
work from a freshly unarchived archive. No matter what I tried some
mysterious thing wouldn't work.
I hate makefiles.
* FIXED various mangulated comments.
NOTICED: press a number key to highlight your creations.
Press it again and nothing happens. It used to unhighlight.
Is this good or bad?
* BUG: Press a number key to highlight your creations. Press any Mouse
Button. Menus no longer work. This is due to all keys doing a
TrapRMB with no corresponding PassRMB. NOW FIXED.
NOTICED: It always seemed like there was something missing from
Classic Chaos. I just figured out what it was. I have now made
Ropers and Wasp Nests CLASSIC.
* BUG: DO_FOREVER and LOOP aren't matching properly in jcformat. FIXED.
* TESTED the latest jcformat on a couple of files. Very minimal testing.
seems ok.
* Added in medmod support to music.lib. We can now easily play med (MMD0
and MMD1) mods in Chaos.
* Added support for the QuadSpectrumAnalyzers into the medmod asm code.
* Added support for the Quadrascopes into the medmod asm code.
* Solved the mystery of converting period into samples per second
* Rewrote the quadrascopes to use the RIGHT formula now.
* Now the scopes really graph the part of the sample that is actually
being played right that instant. So now the scopes are accurate.
You can really see the difference in speech samples such as "Chaos"
where you can now see the peaks and valleys of the waveform as it is
being played.
* Fixing the formula means that the scopes are now "locked in" to the music
better.
* Implemented a 1000 entry lookup table to convert from the period value to
samples per frame. This saves 2 floating point divisions and 2 floating
point multiplications each time a new note is started. But mainly it
saves me the trouble of doing Floating Point math in asm.
* Tested all 6 game musics with the new system and they all work
WONDERFULLY!
* Chaos now officially supports the playback of protracker and MED MMD0 and
MMD1 mods. If you have a choice then use MMD1. Not that it really
matters. I have no idea which routine is faster, all I know is that MMD1
mod format is superior to protracker mod format due to being able to handle
more instruments and being able to have multiple songs per file.
Hooray for Teijo Kinuunen!
Octamed Sound Studio Professional notes:
Octaves are 12, 23, 34, 45, 56, 67, 78, 89, 9A.
Octave 89 and 9A in OMSSP are illegal. The notes are SUPER LOW.
Octaves 34 through 78 all sound the same
CHRISTMAS DAY PLAYTESTING:
* Designed a 4 player level with an exit in the middle, surrounded by walls.
2 different versions.
1. no generators
2. 4 standard generators.
* ACK! BUG: smake release no longer works. I keep recompiling the program
and it keeps telling me "unexpected end of file" and "semicolon expected"
on the last blank line of the game. Ok, traced this to a #ifdef
DEVELOPER with no matching #endif. NOW FIXED.
It took me a while to figure out the above bug so I was late and in a hurry
and I forgot to take the Level with me. So we played a standard game of
James Vs. JJ with 20 scrolls, 4 generators, 4 artifacts and a 20 turn
limit. This is the very first time that I (or JJ) has ever played with a
turn limit. JJ started the game with 2 vanish spells. He gained another
vanish after a few turns. Plus he grabbed yet another vanish as a bonus
spell. So I spent almost the entire game vanished with no creatures to
move or spells to cast. Needless to say I lost. The only possible bug to
report is that once I highlighted my creatures with "1" and then hit the
end of turn gadget and there was some strange noise during the computer
player's turn. I don't really know if anything bad happened or not. After
this the game continued normally.
* FLAW: Various snippets of level editor code are no longer undef'ed during
smake release. NOW FIXED. This saved 1048 bytes on the size of the
release version.
* FLAW: Selecting "Load" from Setup Screen I produces some problems so I just
quickly uncommented it for now. This saved 100 bytes on release version.
As a general principle I believe that games should have a load option on
the first main screen. I'll just worry about it later because right this
second I'm trying to nuke as many bugs as fast as possible.
* FLAW: exiting from reading a spell description makes a beep. FIXED
* BUSY WAITING LOOP? When using cpr to track down the above bug I noticed
something in HandleIDCMP. The line of code that says:
IF (Wait (HiResWindowWaitBit | windowWaitBit) & HiResWindowWaitBit) THEN
never actually waited. I traced over the code in cpr about 20 times and
never once did it stop and wait for me to touch the mouse or keyboard.
So I am thinking that somehow some sort of windowflag got messed up
somewhere. It has never done this before to me more than 2 or 3 loops.
MYSTERY SOLVED: The trouble was that there is an ActivateWindow(window);
call in the HandleIDCMP code now so I guess that as I pressed return on
the line to execute the line, the window activates before I let off the
return key. The strange thing is I am getting RAWKEY code 196 instead of
68 like the return key is supposed to be.
* KEY RELEASE DETECTION mystery solved! Codes 0 to 127 are key DOWN codes
and 128 and up are key UP (RELEASE) codes. So anytime a rawkey code is
>128 just subtract 128 from it and you have the code that was released.
But please note that keypresses do NOT neccessarily come in pairs of
DOWN/UP codes. If the user holds a key down then we are given a series
of Key DOWN codes, one after the other, with no intervening UP codes.
James Conwell's 10 Commandments of Game Design:
================================================
Any game produced by James Conwell MUST have the following features:
1. It must have an option for more than 1 human participant to play in a
game. I don't care what kind of game it is. It MUST have at least
a 2-player option.
2. It must have a 1 player option.
3. It should have an option for 2 player competitive as well as 2 player
cooperative. 2 player cooperative mode is VERY important!!!!
4. It must have awesome music.
5. It must have a wide variety of awesome music, probably including but not
neccessarily limited to the following:
A. Spooky Music.
B. Rave Techno.
C. Straight Dance.
D. Dramatic Music.
6. It must have an intro that can be IMMEDIATELY exited at any time.
7. It must make good use of the capabilities of the format that it
is presented in/on.
8. It must be FUN to play.
9. We must go through the game and take out everything about it that is
annoying and either remove it or make it optional.
10. It must have good graphics.
The only way I know to stop the flicker of the pentagrams is to either:
A: Figure out a way to do double-buffering that really works.
B: Move the pentagrams to the bottom of the screen. (this is just a work
around)
C: Make the game require OS 3.0 and use those double-buffering routines.
* INVESTIGATED the following examples of double buffering from Aminet.
These are all that I could find:
dbuffer.lha dev/e 3K 95+Easy double buffering of screens
DBuff.lzh dev/src 12K 321+double buffering demo w/source
doublbuf.lha dev/src 7K 171+Eg. of fast OS-friendly double buffering
NBuff.lha dev/src 19K 277+Double bufferung routines example. V2.2
All these examples SUCK because:
1. They don't allocate their bitmaps properly. They use that icky
scatterload approach.
2. They use the slow RethinkDisplay(); technique.
3. The ones that don't use RethinkDisplay(); require OS 3.0+. And since I
am making the game compatible with all OS's it is useless to me.
* DOUBLE-BUFFERING of rastports/bitmaps implemented for pentagrams
(finally!). Now they are rock solid, _except_ for during high CPU load
times (like while downloading from the internet on standard serial port)
During high cpu load they flicker a bit sometimes.
I haven't tested it on A500 yet.
**************************************************************************
******* ADPCM asm routines upgrade *******
**************************************************************************
ADPCM stands for Advanced Delta Pulse Code Modulation.
It is a lossy compression algorythm which is supported by the Zyxel Voice
modems and various voicemail packages.
I intend to use ADPCM audio compression technology to reduce the storage
requirements of the speech samples of Chaos. This is useful for persons
such as SAI who have limited hard drive space.
I do not intend to compress the "sound effects" of the game. Only the
speech samples because there are going to be hundreds of speech samples.
The game will soon have about 10 megs of uncompressed speech which will
be only 2.5 megs compressed.
ADPCM3 is the 3-bit algorythm. It compresses sound to an 8:3 ratio.
ADPCM2 is the 2-bit algorythm. It compresses sound to a 4:1 ratio.
ADPCM3 produces better sound quality but at the expense of taking a lot
more CPU cycles to do it.
ADPCM2 sounds noticeably worse than a standard Amiga sound sample but
speech samples still sound MANY times better than the algorythmically
generated speech of translator.library.
I have NO intention of using ADPCM3 compressed sound in Chaos.
If you want sound quality then don't compress.
If you want small size then compress with ADPCM2.
So there is no need to use ADPCM3. I'm just including it for orthogonality
and because the routine is so small.
The beginning of this upgrade starts with Christian Buchner's
asm coded ADPCM routines as a starting point.
I will optimize them for maximum speed.
* ADPCM2_Decrunch routine
REVISION 1+2 combined together:
For every byte that gets decompressed James Conwell has:
1. Eliminated 6 instructions and
2. Replaced 4 slow instructions with 4 fast ones and
3. Eliminated 4 bus accesses. (*Very* important on A1200 with no Fast Ram) and
4. Eliminated 3 bus accesses for every 4 bytes written.
ACK! I just realized that my main loop is 256 bytes long!
due to the 16-byte cacheline properties of the 020 and 030 this
will almost NEVER fit into the cache. In order to make sure your code
fits in the cache you must keep your main loop down to 240 bytes!
My next revision of this routine will fix this.
REVISION 3:
Main loop now takes only 194 bytes.
Saved 14 cycles per decompressed byte on 68000.
Saved 6 cycles per decompressed byte on 68030.
REVISION 4: was a failure.
I attempted to replace the multiply,add,asl instruction set with a
256 entry lookup table. Since the variable having all the math done
on it is the delta and since a sample is only 1 byte big, I figured the
largest delta one could possibly generate would be 255. So I'd have
a nice little table of 256 words which would save me 78 cycles per
decompressed byte.
Hours later... it didn't work... after investigation it turns out that
the delta is unboundedly large. I ran 2 sound samples through the
algorythm and the delta reached a maximum of 15944!!! Ack.
Stupid algorythm.
Current Standing:
The main loop takes 212 cycles.
So on my standard 22,000 samples per second sounds it will take
4,664,000 cycles per second on an M68000. That is 65% of all available
CPU power just to decompress the audio stream!
REVISION 5:
Ok I figured out how to use the table or do the math the slow way
depending on the size of the delta.
During a quiet sound sample this allows me to save an average of 62
cycles per decompressed byte.
During a noisy sound sample this allows me to save an average of 54.1
cycles per decompressed byte. (save 62 cycles 93.2% of the time, waste
54 cycles 6.8% of the time)
I Strategically layed out the code for maximum speed and minumum size.
This is what I love about coding for the 020 and 030; their 256 byte
on-board L1 Cache. It makes the geographic layout of your code very
important. You must strategically lay out all your branches because
their geographic location in the code is important. Its TOTALLY COOL.
Asm programming is the ultimate strategy game!
Current Standing:
The main loop takes an average of 157.89 cycles during a noisy part
of a sound sample.
So on my standard 22,000 samples per second sounds it will take
3,473,536 cycles per second on an M68000. That is 48.5% of all available
CPU power just to decompress the audio stream!
This algorythm cries out for the power of the 020's barrel shifter
and faster mulu instruction.
I can make an optimized version of this routine for 020+ by replacing
all those add.w d2,d2 commands with the 020+ SCALED index addressing
mode. Such a routine would REQUIRE an 020+ to run.
DRAT! I was all ready to declare this routine "FINISHED" but
unfortunately my main loop is 248 bytes! It will only fit into the
020/030 cache half of the time! 8(
I will now make 2 slightly different versions of this routine.
_000 for 68000
This routine unchanged.
This routine writes its data to chipram a longword at a time. (4 bytes)
This routine runs on any M680x0 series processor.
_020 for 68020 and up
This routine with all the add.w d2,d2 replaced with the *SCALE
addressing mode. This will only speed things up by 2 cycles on 030
so the main reason for using *SCALE is to reduce the main loop size
by 16 bytes from 248 down to 232 so that the main loop will ALWAYS
fit into the onboard L1 cache.
This routine writes its data to chipram a longword at a time. (4 bytes)
This routine REQUIRES an M68020 or higher processor.
NOTE: I have coded many asm routines for use with many C and Basic
programs but this is the very first time I made 2 different versions of
the same routine. Usually I didn't need to make 2 different versions
due to there not being any advantage to doing so. On a few occassions
I could have made 2 or 3 different versions optimized for different
processors but it wasn't important enough to bother.
OOPS I just figured out another optimization to save 4 cycles in the main
loop. I replaced btst #1,d1 (10 cycles) with btst d7,d1 (6 cycles)
Combined with earlier speedups,
during a noisy sound sample this allows me to save an average of 57.56
cycles per decompressed byte. (save 66 cycles 93.2% of the time, waste
58 cycles 6.8% of the time) This optimization also saved another 6 bytes
in the main loop
FINAL STANDING
The main loop takes an average of 154.432 cycles during a noisy part
of a sound sample.
So on my standard 22,000 samples per second sounds it will take
3,397,504 cycles per second on an M68000. That is 47.46% of all available
CPU power just to decompress the audio stream!
* ADPCM3_Routine: Ok I rewrote this routine several times and kept speeding
it up. Eventually I got to a point where I can do something radical that
the Motorola book says will be faster on 000 - 040 but I didn't trust it
so I wrote the routine 2 different ways and was then going to race them.
I copy & pasted the timing code from Chaos into the adpcm routine but
all it did was give me total GARBAGE results that had nothing to do with
anything. That timer() routine is just useless. 8(
ALL ADPCM routines still need more work and are on hold until I can time
the various methods.
**************************************************************************
******* END of ADPCM Asm Routines Upgrade for now *******
**************************************************************************
January 6th, 1999: I've now been working on Chaos for 2 years.
A lot was accomplished this year but not nearly enough for my tastes.
Due to the demands of trying to design the world's best strategy game and
work a day job I just didn't get enough done. I'm very dissatisified that
I still haven't got the music and digital sound effects upgrade installed,
even though this is actually the very first thing I wanted to do 2 years ago.
STATUS REPORT:
There are 132 creatures in the game.
There are 128 Magic spells
There are 37 inanimate objects
There are 7 growths
There are 304 items total.
The main program for v2.3d is 366536
chaos.dat is 66368
Archive size is 500k.
* PRIVATE functions instead of static. Using the word "static" to mean
"private" just doesn't make sense to me. So JC now supports the use
of the keyword PRIVATE for making a function private to a particular
file.
* Put in a Vblank_Counter variable into animatorasm that gets incremented
once each vblank so I have a reliable method of timing things. Obviously
there will be tremendous roundoff error on timing small things but it will
be ok for long operations.
* NEW Asm routines: TestPixel4_320, TestPixel1_320, TestPixel4_640 and
Test_Pixel1_640. We no longer use the old TestPixel4 and TestPixel1
routines. We now use these new faster routines. Since we only use
rastports of 640 or 320 pixels width I made these routines take advantage
of that fact. These new routines are 58 cycles faster on 68000.
The old routines are still available in case we ever need to use them on
a strangely shaped bitmap/rastport.
* New global variables LoResBitPlane and HiResBitPlane. These are pointers
to the first byte of the first bitplane of the LoRes/HiRes screens.
This is a pointer to the actual data, NOT a bitmap structure.
These pointers are required for the new TestPixel routines because the
new routines don't take a pointer to a rastport struct as a parameter,
instead they take a pointer to the first byte of actual data of the
first bitplane.
Timing Results for 1 million calls on 25Mhz 68030
Times measured in Frames. (There are 50 frames per second)
OS ReadPixel TestPixel4_320 TestPixel1_320
Frames 2970 398 291
Calls/frame 336.7 2512.6 3436.4
Speed Increase 1x 7.46x 10.2x
Timing Results for 1 million calls on 7.15909 Mhz 68000
Tested on A2000 with 1 meg chip + 8 megs fast ram.
126 frames to do nothing; this is subtracted from the results.
OS ReadPixel TestPixel4_320 TestPixel1_320
Frames 8272 2070 1577
Calls/frame 120.9 483.1 634.1
Speed Increase 1x 4x 5.25x
ADPCM process/task will
1. Use right channel. So that the left channel of algorythmic audio can
play simultaneously if needed.
2. CTRL-C means to Cancel (abort) playback of the audio. The adpcm task
aborts its current playback (if any) and then waits for more commands.
3. CTRL-D means DIE. Kill the task at the end of the game.
4. CTRL-E to start play back. Set up some variables then send the
Chaos_ADPCM_Task a ctrl-e and it will start playing the specified file.
5. If the Chaos_ADPCM_Task should ever stop playing for any reason then
it will send the main task a CTRL-F (F=Finished).
It doesn't matter _why_ it stopped playing. If it stops playing for any
reason it signals that it is finished with CTRL-F.
So if the sound sample has completed playback, or it couldn't get the
audio channel allocated or it couldn't find the file or the file had a
read/write error or the task was told to stop with CTRL-C, then it signals
a CTRL-F back to the main task right before it begins waiting for the
next command.
68030 timings Using supermegainline version of ADPCM3 decrunch
Main loop is much larger than 256 bytes.
17956 ADPCM_000.lib JC
Filesize Filename Frames
19585 LetsPlayChaos.adpcm3 15
13060 LetsPlayChaos.adpcm2 8
195100 ChaosRules.adpcm3 157
130070 ChaosRules.adpcm2 78
17484 ADPCM_020.lib with a routine that fits into the 256 byte cache
19585 LetsPlayChaos.adpcm3 13
195100 ChaosRules.adpcm3 128 18.5% faster
So even though the megainlined version saves 2 instructions (bsr/rts) for
each byte decompressed, we still lose speed overall because the main loop
becomes so big that it won't fit into the cache of the 020/030.
According to the timing charts the megainlined version should have been
faster on all CPUs.
* I made 2 versions. 1 optiminzed for 000 and one optimized for 020.
ADPCM_000.lib and ADPCM_020.lib
* NOTE about OS compatibility: If the game were ever to require OS 2.04
or higher (which I assume it will when we make the game internet-capable)
then we can replace all occurences of CreatePort with CreateMsgPort
and all occurrences of DeletePort with DeleteMsgPort and all occurrences
of CreateExtIO with CreateIORequest and all occurrences of DeleteExtIO
with DeleteIORequest then we could stop linking with amiga.lib and
hopefully save some bytes on the executable filesize.
* MAKEFILE improved with new options: demo_020, release_020 and
releasewithleveleditor_020. These options compile all JC code using
68020 instructions and optimizations and link with the 020 version
of ADPCM lib. This way all low end users will get a version of the game
that makes MAXIMUM use of their limited processing power.
smake demo_020 produces a filesize of 338360
smake demo produces a filesize of 342312
* STRANGE: On December 25th, 1998 the filesize of the demo was 366536.
Since then I've added about 1k of asm code, 500 lines of JC code and
about 18k of lookup tables yet somehow the filesize has SHRUNK by 24k!
The only thing I can figure is I must have forgot to do a smake clean
before doing smake demo on Christmas day, thus I was using unoptimized
code.
ADPCM DECRUNCH ROUTINES
Christian Buchner vs. James Conwell
Using the current versions of the routines on January 16th, 1999
On all timing tests the display mode is the standard Chaos split screen
320x256x5 bitplanes and 640x256x3 bitplanes.
68000 with 8 megs fast and 1 meg chip.
CB JC
Filesize Filename Frames Frames
19585 LetsPlayChaos.adpcm3 152 101 1.5x faster
13060 LetsPlayChaos.adpcm2 134 61 2.2x faster
68030 with 12 megs fast and 2 megs chip.
19585 LetsPlayChaos.adpcm3 17 13
13060 LetsPlayChaos.adpcm2 15 8
195100 ChaosRules.adpcm3 165 128 1.3x faster
130070 ChaosRules.adpcm2 152 76 2x faster exactly
There wasn't enough chipram available to easily test the "Chaos Rules" 500k
sample on my 68000 based amiga so I just skipped it.
* TESTED the adpcm3 playback routine on 26.5 Khz sound samples from a floppy
drive on my 25Mhz 030. WORKS PERFECTLY. No skipping. It plays the samples
back straight off the floppy using double-buffering.
* TESTED the adpcm3 playback routine on 26.5 Khz sound samples from a floppy
drive on my 7Mhz 000. SERIOUS buffer underflow. The routine would need to
be at least twice as fast as it currently is to work on the 7Mhz 68000.
Even if I put in the 24k lookup table + all my other tricks I can't make
it go twice as fast as it already is.
* TESTED the adpcm2 playback routine on 26.5 Khz sound samples from a floppy
drive on my 7Mhz 000. Small amounts of buffer underflow for each buffer.
So that a long sound sample skips a bit here and there or crackles.
Sometimes the head has to seek to the next part of the file and there is a
BIG skip. 8( Hopefully all will be fine once I cut the sampling rate in
half to 11Khz for the floppy disk version. The hard drive version will
still use the 22Khz sounds.
It would really help if the floppy version could use a fast file system
floppy. But, alas, that requires OS 2.04 or higher.
* BUG in my 8svx datatype. I squished my sound samples down to 11k but
now x2adpcm can't convert it due to a silly bug in the 8svx datatype.
So all my sound upgrading is on hold till I get a new internet account
and download the latest version of the 8svx datatype.
* Sent off for a new internet account on January 16th, 1999. It costs
$240.00 for 1 year and has dialups all over the USA and Canada.
* Changed wizard names to names that actually mean something to me.
This makes the game a lot more fun for me.
SETBACK: I can't get the fake seglist code from the RKRM manual to work.
I just get strange problems. So my new Chaos_ADPCM_Process won't work.
I must either wait to get my new internet account to find out what's going
on or I must really load the code off of disk and communicate to it with
messages instead of just signals like I am doing currently.
I own many Amiga programming books but none of them explains how to create
a process using some code that is already in your program. This
information might be in the AmigaDOS Developers book but I don't have that.
Dear SAI: I really hate the bipedal generators in their current form.
So we should do one of the following:
A) Set bipedal generators to generate at the same frequency as standard
generators.
B) Have yet another setup screen that appears when Generators>0
that allows us to turn on/off which types of generators we will
get. A "Generators Setup Screen".
I prefer option A simply because its the least work while making the game
meet my wants. If you don't like option A then we'll have to do option B.
* CHANGED: Bipedal Generators to generate at the same rate as Aviaries.
PROBLEM: The pearl.font isn't being used in the game when I play it
on my OS 1.3 amiga. ??????????????????
Ok, I made some changes. Maybe this is fixed now.
* James opens a can of "WHOOP ASS".
* James guggles down the whole thing.
* James rewrites line of sight testing to be 9x faster than present,
21x faster than it was originally. Boring details follow:
******************* LINE OF SIGHT SPEEDUP UPGRADE *******************
Timing test of line of sight routine on a clear board with a wizard
in each corner pressing the L key. The animator task is stopped but the
color cycler task is running at full speed.
68030 68000
Bottom Left Corner: 26 frames 181
Bottom Right Corner: 28 frames 181
Upper Left Corner: 27 frames 180
Upper Right Corner: 27 frames 180
I massaged the C code a bit to use WORDS instead of ints but this actually
made it 4 frames slower! (?) Put it all back to ints.
C optimization 1.: saved 1 frame on 030.
Every corner now : 25 frames
C lookup table implemented:
68030 68000
Bottom Left Corner: 12 frames 92
Bottom Right Corner: 12 frames 92
Upper Left Corner: 12 frames 90
Upper Right Corner: 12 frames 90
2.25x 2x times faster
C optimization 2.
68030 68000
Bottom Left Corner: 10 frames ??
Bottom Right Corner: 10 frames
Upper Left Corner: 10 frames
Upper Right Corner: 10 frames
2.7x
C optimization 3. (optimized AutoAccept())
68030 68000
Bottom Left Corner: 8 frames ??
Bottom Right Corner: 8 frames
Upper Left Corner: 8 frames
Upper Right Corner: 8 frames
3.37x
C optimization 4. (precalc all AutoAccept())
68030 68000
Bottom Left Corner: 7 frames 68
Bottom Right Corner: 7 frames 68
Upper Left Corner: 7 frames 68
Upper Right Corner: 7 frames 68
3.85x 2.65x times faster
Now I will rewrite the inner loops in optimized assembly language.
68030 68000
Bottom Left Corner: 3 frames 27
Bottom Right Corner: 3 frames 27
Upper Left Corner: 3 frames 27
Upper Right Corner: 3 frames 27
9x 6.66x times faster
Added special optimized code for handling straight lines and 45 degree angles.
68030 68000
Bottom Left Corner: 3 frames 24
Bottom Right Corner: 3 frames 24
Upper Left Corner: 3 frames 24
Upper Right Corner: 3 frames 24
9x 7.5x times faster
C COMPILER BUG: a line like this screws everything up and reports bogus
errors:
ELSE // up to left \
Absorbed isLineOfSightTestQ into isLineOfSightQ
68030 68000
Bottom Left Corner: 3 frames 23
Bottom Right Corner: 3 frames 23
Upper Left Corner: 3 frames 23
Upper Right Corner: 3 frames 23
9x 7.8x times faster
If I was completely psychotic I could save 1 last frame on the 68000
version only.
Just for fun I went back and put in the original line of sight testing
code from v1.7 (this is before I put in those optimizations in 1997)
68030 68000
Bottom Left Corner: 63 frames 392
Bottom Right Corner: 63 frames 392
Upper Left Corner: 64 frames 390
Upper Right Corner: 63 frames 392
21x 17x times faster
******************** END LINE OF SIGHT SPEEDUP UPGRADE *******************
* Made algorythmic sound effects allocate/deallocate the sound channel.
Now that it no longer hogs a sound channel at max priority I can add
ingame music.
Tuesday, Jan. 26th. Melissa and Mike got busted/bluffed by mike's wife
for cheating on her. Lots of crap. No work accomplished.
* CLASSIC: Ogre Mage, Standard Wall, Weak Wall, Rock, Speed and Slow
are now CLASSIC.
* CHANGED: Impurities and Agent Casting can no longer be set using the
ingame menus. I had to do this to pave the way for the internet upgrade.
We can only allow the user to change settings during the game which do
not materially affect gameplay. Things which materially affect gameplay
must be set _once_ at the beginning of the game and then remain unchanged
for the duration of that game. Replaced MENUImpure and MENUAgents with
the global variables "Impurities" and "AgentCasting".
At some point I'll use the empty space for music and sound effects
options.
* Placed Impurities and AgentCasting on setup screen and in savegame file.
This means the savegame format has changed so previously saved games
will no longer load correctly. Tested and verified, I loaded an old
savegame and the whole game locked up but at least the computer didn't crash.
* FLAW: (at least I assume this is a flaw). I had a stone giant stand on
top of a dead stone golem. Each turn the computer players would justice
or dark power my Stone Giant and it would be reinstated as a stone golem.
then the next player would justice my new stone golem and it would go
back to being a Stone Giant. ad infinitum. This is caused by the fact
that justice and dark power leave corpses behind when in previous versions
they did not. Anyway I changed it so that Justice/DarkPower/Exorcise/etc.
do not leave corpses behind anymore. FIXED and TESTED.
* BUG: C for CAST does not work on the second Justice/DarkPower/speed/slow
etc. (any multiplicity spell I guess.) Strangely, the C key works for
Shadow Woods and other trees. Ok, I traced this to a problem in the
spell files where the target of the spell is highlighted with the
highlight sprite. The C key uses the position of the HighLight Sprite
for determination of who the caster is. This information was being
lost. NOW FIXED in every spell file.
It would be really nice if we could position wizards with cut and paste
in the level editor. We could then design multiplayer levels much more
easily. This is something both Joseph and James have been wanting.
Leaving this for SAI.
SAI: The editor now has fragile support for this.
* The turn number is now displayed on the New Game and Quit Game requesters.
I've wasted quite a bit of time the last few weeks due to trying to
maintain OS 1.3 compatability. I've had major problems which are still
not solved with the ADPCM process. I think
that if I was using OS 2.04+ routines that these problems would simply
not exist. Therefore there is a very real possibility that I will
make the game require OS 2.04+ very soon.
* Disrupt no longer kills scrolls + I added the following sentence to the
description: "This spell currently does not affect wizards, growths,
inanimate objects or scrolls."
* various changes to docs.
* Feb 8th, 1999: Downloaded the latest 8svx and sound datatypes.
Downloaded the ZXAM20b.lha emulator from aminet.
* FLAW: At beginning of Spell Selection phase there is still text left over
at the bottom from the movement phase. FIXED.
* LIST PROCESSING implemented for the sentence generation of what wizards
say during their spell selection. There are now around 20x as many things
that they can say without taking 20x the memory. It's extremely easy to
edit the TalkLists file and add new stuff in, you don't even have to
recompile! I took this code from a True Basic paragraph generator that I
made a few years ago. Only I didn't bother to translate all the paragraph
stuff. Just the 1-line sentence generation and list processing stuff.
* WriteNearBottom can now handle 2 lines of text.
* BUG: a computer wizard cast Alliance but then didn't actually cast it on
anyone. Or at least he didn't get any allies by casting it. This has now
happened 10 to 12 times. When playing a game with no generators the
Alliance spell always works. The problem is that the computer wizards
always try to ally themselves with the Independents when independents are
available but the spell is programmed to fail when applied to an Independent
creature. NOW FIXED.
* ADDED New CastInfo bits: CAST_NOINDEPENDENTS and CAST_NOASLEEP so that it
it is illegal to cast Alliance on independent or sleeping creatures.
It is now illegal to cast sleep on sleeping creatures too. This will help
prevent the computer players from doing stupid stuff.
* CHANGED: CAST_UNDEAD to CAST_MUSTBEUNDEAD.
BUG: If you select "quit" from the menu and then click the checkmark then
some enforcer hits are generated. When I run the game under CPR, the game
simply locks up and does not quit. Note to SAI: Does any of this happen
on your system? Note from JC: I fixed this bug months later on October
21st, 1999.
* BROKEN: Aviaries, Dragon Nests and Bipedal Generators never generate
anything anymore 8( (at least not when playing with 8 wizards.)
I just played a test game against 8 wizards and 4 generators and the
generators NEVER generated anything. Ok, this is because I had
AgentCasting turned off. I have NOW FIXED this so that even with
AgentCasting off, the generator agents still generate.
* MAJOR BUG: A computer wizard just attacked his own elephant! This might
be because he was beside it and was "engaged" to it or perhaps he tried to
mount it? Lucky for him his elephant didn't attack him back, it charged
toward the nearest enemy instead. The bug was in ChooseDestination().
NOW FIXED.
* BUG: Computer Wizards keep trying to mount meditations which are already
occupied. NOW FIXED.
* BUG: A computer Wizard just cast Animate on turn 1 and then nothing
happened. It didn't say what he cast it on. It didn't say he aborted it.
OK, he didn't have any inanimate objects so "nothing" is exactly what was
supposed to happen. I modified isStupidCast to check for this but
I have NO idea if my player number is correct or off by one.
NEVER MIND: I have eliminated the "player" parameter from isStupidCast.
It now gets its player information directly from CasterCell, thus permanently
and forever solving the off by 1 player number problem for this routine.
NOW FIXED.
* BUG: Computer wizards routinely waste Subversion type spells on creatures
which are being ridden. I don't know why FLAG_NOWIZARDCELL doesn't prevent
this from happening. Sleep spells are wasted this way too. Leaving for SAI.
SAI: Well I looked at the code for this and I can't see anything wrong
with it. But I think I have seen this happen as well. I'll investigate.
SAI: Found and nailed the bug. NOW FIXED. Details appear later.
HandeIDCMP changes:
* I took out that ActivateWindow() call because it was annoying me by
transfering my input to chaos when I am in the middle of using another
program, such as web browsing or CED etc.
* Added an ActivateWindow() call to activate the main window whenever
you click in the Hires window.
END HandleIDCMP changes
* FLAW: Dark Wood, Speed and Slow spell descriptions do not show how many
attempts of each you get. FIXED.
* ADDED: DO_THIS to JC.h and JCformat.c. Its just like DO_FOREVER. For
some reason every time I see DO_FOREVER my brain expects the whole loop to
execute forever even though there could be an exit condition in the
LOOP_WHILE or LOOP_UNTIL. So I just made a DO_THIS.
* All spells which start with the letters "a"-"g" have been upgraded to JC.
* BUG: The "Destroy Wall" spell destroys walls but does not reveal what the
wall was covering. If the wall was covering a scroll or artifact or corpse
or etc. then it is destroyed. FIXED by changing
InsertCreature(cell,NOTHING,NOTHING) into RestoreCell(cell)
I can't think of any time that we should be inserting a NOTHING into a
cell. If we want to get rid of an object then we must use RestoreCell(cell)
so that any covered objects are revealed. If we want to insert a creature
then we should just InsertCreature(cell,CreatureID,Player)
If you really want to wipe out an entire cell then just call:
void ClearCell(int cell)
FUNCTION
ObtainSemaphore (&BoardLock);
ClearVisible(cell);
ClearUnder(cell);
ReDrawCell(cell);
ReleaseSemaphore(&BoardLock);
END_FUNCTION
* BUGS: Boil, Quench and Still all have the same bug as Destroy Wall.
ALL NOW FIXED.
* ALL occurrences of InsertCreature(cell,NOTHING,NOTHING) removed from
every where! Most were replaced with
ClearUnder(cell), ClearVisible(cell), RedrawCell(cell)
Now I went back and replaced those code sequences with ClearCell(cell)
* FLAW: RestoreCell(cell) does not call RedrawCell(cell) like other core
routines do. Since RestoreCell will often change what needs to be drawn
there I made it do it automatically. FIXED.
* BUG: I played a game with 99 hidden scrolls and 99 hidden artifacts and 2
wizards and the the initial "Repulsion" messed up the color pallette of the
game. There was a place where the code did a return without reloading
the original colour pallette. FIXED.
* BUG: Animate destroys any item which is under the item being morphed.
Corpses, artifacts, scrolls, etc are being destroyed this way. FIXED.
* BUGS: Alter Reality, MassMorph and Mutate have the same bug as Animate.
ALL FIXED NOW.
* Nuke destroys the entire cell and I left it that way.
* CHECKED over every occurrence of InsertCreature in every spell file and
everything looks good.
Question for SAI: I was working on IntelligentMagicWoodCasting and I just
always assumed that if a wizard was warped off the board then GetWizardCell(p)
would return -1. But that is not the case. GetWizardCell() has no special
code to handle warped wizards. Is GetWizardCell going to tell me the
last position of the wizard when he was on the board? ??
Should any of this be changed?
SAI: This indeed sounds bad. NOW ALLEGEDLY FIXED
* NEW stuff to be used with my upcoming IntelligentMagicWoodCast(CasterCell)
* NEW functions sqDistanceFromNearestTeamWizard (CasterCell,cell) and
sqDistanceFromNearestEnemyWizard(CasterCell,cell) which
return the sqDistance from cell to the nearest (team/enemy) wizard.
Team info is extracted from CasterCell. CasterCell is only used to
determine which team is being dealt with.
* NEW predicates: isTree, IsTree and isIDTree.
*** Playtesting ***
Playtested 1 game, here is what I found. I controlled 1 wizard against
7 enemy wizards. Nobody was in an alliance. No scrolls, no artifacts.
99 spells. 0 turns. Texas Trash'em. 4 generators.
* BUG: I was player 2. Player 8 killed player 3 and somehow all the foes
vanquished from the player 3 wizard got put onto my wizard. NOW FIXED
(see far below)
* BUG: Player 6 just killed my orc with his wizard but it put the orc on
_my_ wizard's Foes Vanquished. NOW FIXED (see far below)
* BUG: uhmmm every wizard that I can see has the exact same Foes Vanquished
list. NOW FIXED (see far below)
I Won the game in 22 turns (This is not a bug :)
* BUG: After winning it showed the score window and the window title sort of
says "Player scores for turn 22" but the first 4 bytes of "Player" are all
messed up. Ok, this is happening anytime I click in the HiResWindow. I
don't know why the title gets trashed, it might be a symptom of a serious
problem but I have simply worked around it by changing the Wait().
Technically the bug is still there, you just don't notice it so much
since the window immediately gets closed and reopened.
started a new game identical to the last one:
* BUG: Wizards 2,3,4 say "Foes Vanquished 0" on their info screen.
Wizards 1,5,6,7,8 have a big blank spot instead. NOW FIXED (see far below)
Ok, now I completely quit the game, then did "run chaos" from shell.
Now all the wizards say "Foes Vanquished 0" like they are supposed to.
*** END Playtesting ***
* Fixed Eye for an Eye, Torment, Nuke, Free, Alter Reality spell descriptions.
* CHANGED:
isWizard to isExposedWizard
IsWizard to IsExposedWizard
FLAG_NOWIZARD to FLAG_NOEXPOSEDWIZARD
to make the code more understandable.
* Scroll Delay now defaults to 0.
** Playtest game **
* BUG: My ally cast Magic Shield on my Basalt Golem yet its Magic Resistance is
still 0. This happened after most of the other wizards had been killed
off. ??? I just cast Magic Shield on myself on turn 1 of a new game and it
had no effect! The recovery code was messed up. NOW FIXED.
* BUG: Brain Boost doesn't work either! The recovery code was messed up.
NOW FIXED.
* BUG: an organge jelly just grew over my Nightmare (my nightmare is not
being ridden) and the orange jelly just pirated his Foes Vanquished. The
entire list of Foes Vanquished for the Nightmare is now on the Orange
Jelly. NOW FIXED. see below.
* BUG: I uncovered the nightmare and it has no Foes Vanquished. It doesn't
even say "Foes Vanquished 0". Its all one big blank spot. NOW FIXED.
see below.
* REWROTE: the whole foes vanquished handling so that a creature can be
covered then uncovered and still retain his foes vanquished
list without it being displayed on the growth in the meantime.
The new way seems more logical to me and it allowed the Killed() function
to be much shorter and simpler. Now the van_count and FoesVanquished and
oldvan_count and oldFoesVanquished are all built right into the cell
structure. And the Wizard structure now has van_count and FoesVanquished
array also. NOW FIXED.
* I intentionally fixed the above two bugs and 1 part of the reason I
rewrote the foes vanquished handling was because I was hoping that in the
process of doing so all the other foes vanquished bugs would mysteriously
disappear. Well, guess what? That is exactly what happened. All the
other foes vanquished bugs just mysteriously disappeared. ALL FIXED NOW.
* Modified io.c to properly load and save the information. This means the
gamesave format has changed.
By turn 23 it was down to just me and 1 allied computer wizard.
* BUG: _Any_ time _any_ wizard kills _anything_, the kill shows up on ALL
wizard's "Foes Vanquished". NOW FIXED. see above.
BUG: at some point the audio started sounding strange.. blah blah blah.
I quit the game normally. Later on I recompiled and when it was supposed
to say "compilation complete" the whole computer crashed and reset (no guru)
and the hard drive nearly got trashed. It is "validating" now (has been
for several minutes). No actual data was lost due to the fact I'm using a
real computer and not a pentium. Be on the lookout for some sort of audio
device using/opening/closing bug. I think maybe an audio channel doesn't
get closed sometimes. See below.
* BUG: When computer wizard 1 is on the top of the screen and he is trying to
mount his steed yet is engaged, this triggers enforcer hits. Enforcer
hits do a DisplayBeep() which is what messes up the sound I think. I
know that enforcer hits make the sound effects sound funny. I think this
is because it changes the setting of the audio filter.
(Enforcer Hits problem was in EngageChoice) NOW FIXED!
* STUPID: A computer wizard cast demonic touch on a sleeping dragon (which
was the only enemy creature that he could cast it on). FIXED.
* STUPID: Actually, after looking at the code I could see that ANY spell
might potentially be cast on sleeping creatures. I changed it so that
casting any spell on a sleeping creature is considered stupid except for
Wake. FIXED.
* BUG: A wizard cast Alter Reality on a pegasus being ridden by another
wizard and the spell failed. I have changed Alter Reality so that it can
be cast on creatures which are being ridden by the wizard. I tested this
and it really works! FIXED.
* BUG: Sometimes wizards try to cast Kill on a creature which is being
ridden. The assistance says FLAG_NOEXPOSEDWIZARD yet the spell is
programmed to fail if there is a wizard anywhere in the cell.
I changed this so that the spell now matches its computer assistance
flags. This means it now succeeds against mounted creatures. FIXED.
* FLAW: You can't easily tell when a Subversion/Betrayal/Abduction works or
not. It now prints "Spell Succeeds!" at the bottom of the screen
when it succeeds. (It already said "Spell fails" when it fails.) NOW FIXED.
** END playtest game **
* REMOVED SoundStat from the CreatureInfo structure for the following
reasons.
1. It doesn't belong there. This stat will be set dynamically and will
be different on different people's amigas. It shoudn't even be saved
in the savegame file. It ABSOLUTELY should not be saved in the
savegame file. Well, ok I guess we could save it so long as we
regenerate the stat each time we load the game.
2. It was a UBYTE which isn't big enough anyway.
3. It was stuck in the wrong place for some unknown reason so by
eliminating it we actually save 4 bytes instead of only 1. (it was
totally messing up the alignment.)
4. I am going to implement SoundStat as its own array when I start adding
the digital sound effects to the game.
* INTELLIGENT MAGIC WOOD CASTING implemented: Works great!
Wizards now cast Magic Woods close to themselves and their allies while
keeping them as far away as possible from their enemies.
However any wizard who has " mad", "mad ", "kalsu", "crazy", "krazy" or
"insane" in his name will use the random treecasting routine instead.
This feature is dedicated to Joseph Dixon who said the old way of
casting trees made the game look stupid 8)
Feb. 22, 1999 Mike the freak tried to start a fight with me.
Nothing accomplished Feb. 23-24.
* BUG: Team Scores are wrong when several people are on each team.
Team Life is wrong when several people on each team.
The score and life of the lowest numbered team is being displayed for
their team and their score and life are being displayed for the OTHER
team. NOW FIXED. + the code is a bit more simplified.
* NEW FUNCTIION: AdjacentEnemies(source,cell) to return the number of
enemies of source which are adjacent to cell. Needed for below:
* INTELLIGENT DarkWood and ShadowWood Casting Implemented.
Basically the computer wizards try to cast these trees adjacent to lots
of enemies which are nearby. A small consideration is given to
enemy generators.
* NEW FUNCTIONS to support IntelligentCreatureCast
int isWizardInDangerOfDying(int cell);
int TotalCombatOfAllAdjacentEnemies(int source,int cell);
int TotalRangedCombatOfAllAdjacentEnemies(int source,int cell);
int SmallestAdjacentEnemyLifeToCombatRatio(int source,int cell);
* AVOIDED passing player numbers as parameters to all new functions. This
is to facilitate the elimination of all old wizards[] references by
upgrading to Wizards[] and to help me get rid of all those p+1, p-1
constructs.
* PROBLEM: Every time I am about to win the game I have a bunch of
creatures closing in on the last enemy wizard. It is now a bit harder to
kill wizards since they are sometimes surrounded by trees which block
many of my possible paths of attack and shooting. But every time as I am
closing in the computer wizard will cast a creature to stop me but he
always casts it in the wrong place (like BEHIND him instead of in FRONT of
him). This always makes me feel sorry for the poor stupid computer
wizards. If only he would have cast his dragon IN FRONT of his wizard
(between his wizard and my dragon) he could have lived for at least 1 more
turn. The solution is the following:
* INTELLIGENT CREATURE CASTING Implemented. Works great.
* WOW: I just played a test game and here is what happened on turn 1:
A computer player intelligently surrounded himself with MagicWoodTrees
The excess trees were placed down and to the right which was very smart
because nobody was anywhere near the bottom right corner.
Then, the next computer player cast a Thundermare. But instead of
casting it next to himself he cast it 3 squares away next to the guy who
just cast those magic trees. The ThunderMare is now adjacent to the enemy
wizard and 2 of his Magic Trees! He's ruthless! And he did this EVEN
though there was another wizard who was closer! (but had no magic trees
or other creatures.)
Another computer wizard cast a nightmare and instead of casting it
randomly he cast it adjacent to an enemy wizard who is now engaged to an
undead creature!
The above 2 engaged wizards were the first to die, thus proving that the
other wizards, did, in fact, cast intelligently.
Couple of turns later: Some computer guy just cast a Bolter Wall directly
between my wizard and my Eagle! He completely messed up my whole plan!
Instead of just throwing it out on the board he put it where it would
cause me a lot of problems.
* BUG: in new IntelligentCreatureCast: Casting a creature while in someone
else's tree makes the creature become the tree owner's instead of the
caster's. FIXED.
* All spells which start with "h"-"p" have been upgraded to JC.
* PROBLEM: I have killed wizards many times on the first turn with Ball
Lightning and many other times during the game also. In fact, lately
I've been winning the game in only 12-18 turns. So I have now
* REDUCED Ball Lightning's Life damage from a 10:1 ratio down to 2:1.
BUG: My wizard with 21 life just cast sanctuary and it only gave him
2 recovery!!! I am unable to duplicate this bug. Perhaps someone
whacked him with a poison dagger when I wasn't looking. I don't know.
* BUG: The spellmanager just crashed my computer while processing the
spell file for MassMorph. I mistyped Commment: instead of Comment:
FIXED by SAI.
* All spells which start with "q"-"z" have been upgraded to JC.
* CHANGED: Abath combat from 4 to 8 since the description says that it
has an enlarged horn which can induce severe bruising.
* BUG: smake newspell does not rebuild pool.ssc. Thus when I change a
spell description and do smake newspell, the new description is included in
spells.tex and spells.html but not in the game itself.
smake clean smake dev does not rebuild pool.ssc either. As near as I can
tell only smake release rebuilds pool.ssc. Leaving this for SAI.
SAI: Allegedly fixed this by making smake newspell first delete pool.ssc
so that the system will have no option but to remake it.
SAI: Well that didn't work, so now I deleted pool.txt as well.
SAI: That didn't work either, ISWYM about this problem. I think the real
difficult is that Amiga makefiles don't allow two dependencies on the left.
SAI: Oh, no wonder it isn't working there is nothing in the makefile that
causes the pool.ssc line to be invoked. Therefore I've added pool.ssc
to the top line of requirements in makechaos.
SAI: No that didn't work either. Oh, well I continued fixing this
below.
SAI: Gave up on the old makefile and rewrote it.
*************************************************************
***** MAD RAMPAGE to eliminate all wizards[] references *****
*************************************************************
* REPLACED all 3 of the remaining wizards[] references with Wizards[] in
predicate.c. Rewrote various FOR NEXT loops to facilitate this.
* REPLACED both of the remaining wizards[] references with Wizards[] in
chaos.c.
* REPLACED all 5 of the remaining wizards[] references with Wizards[] in
bonus.c. Rewrote ChooseGUISpell() to require a REAL player number instead
of a fake one.
* REPLACED all of the remaining wizards[] references with Wizards[] in
spell.c.
* REPLACED all 10 of the remaining wizards[] references with Wizards[] in
cast.c Rewrote DoComputerCast() and PlasmaBeamHandler to require a REAL
player number.
After doing all the above I played some test games and found that I had
accidentally created 2 bugs. These were easily fixed but it shows that
extreme caution is warranted.
* All wizards[] references have now been successfully eliminated from
everywhere except the spell files.
Create a new variable "Player" for Cast, CastFree and CastMagic.
This variable will replace "player" and "p" slowly but surely.
player and p are the old fake player numbers.
Player is the REAL player number.
So it is simply a matter of replacing all wizards[p] or wizards[player]
with Wizards[Player]
Eventually "player" and "p" will be obsoleted and removed.
Any function calls of the form Function(player) will be replaced with
Function(Player-1). Eventually all functions will be rewritten to use REAL
player numbers so that the -1 can be removed.
Any function calls of the form Function(player+1) will be replaced with
Function(Player)
Replace wizards[player].xyz with wizardsp->xyz (which = Wizards[Player])
Before attempting this, the main filesize of a smake release is 358544
* All old wizards[] references have been REMOVED from ALL Spell files!
YAY!!
* REWROTE: Drainer(), WakeUp(), HandleJoker(), ScoreAdd(),GetWizardCell(),
CastFreeSpell(), CastMagicSpell(), Multiplicity(),
to use REAL player numbers instead of fake ones.
This allowed me to eliminate ZILLIONS of "Player-1" style references.
* Removed "player","p" and "i" from cast.c functions.
* REWROTE the FOR-NEXT loops so that the "currentPlayer" global variable is
now the REAL player number instead of the realnumber-1.
* REWROTE InformationPanel(), InformationPanel1(), SayName(), AddSpell(),
AddGUISpell(), GetSpells(), WhatSpell(), QuerySpell(), SetSpell(),
ComputerSpellDiscard(), IntelligentComputerSpellSelect(),
to use REAL player numbers instead of fake ones.
* ALL the functions in cast.c, predicate.c, predicate.h, info.c, chaos.c,
spell.c which take a player parameter now take a REAL player parameter.
ALL the functions in move.c and cmove.c already took REAL player numbers.
* Several functions in spell.c which take a real player number parameter
still use fake player numbers internally to index into various arrays.
I'll fix that later.
* Main filesize of smake release is now 357308. Only saved 1236 bytes.
**************************************************************
***** END MAD RAMPAGE ****************************************
**************************************************************
* STUPID: A computer wizard cast reincarnate on his ally's Bolter Wall
which already had Reincarnate cast on it. FIXED.
* STUPID: A computer wizard cast Horror on a creature which already had
Horror. FIXED.
* POSSIBLE BUG: A computer wizard just cast "Free" on a manticore that was
being ridden by another wizard. The Manticore is now an independent and is
still being ridden.
SAI: Yep, this is a bug, the spell file need to check for this.
SAI: NOW FIXED.
* BUG: Click on an eyeball. Now try to attack an undead creature by
accident. Now it says you are engaged even though there are NO creatures
next to you. You can't move or do anything but cancel your movement.
This was found when I tried to attack a Wizard that had Liched himself.
Leaving this for SAI. FIXED by SAI. Details appear later.
************************************************************************
******* An Enforcer Hit Bug Related to a Vanished Computer Wizard *****
************************************************************************
BUG: I vanished an enemy wizard and then at some point thereafter (perhaps
in the movement phase) numerous enforcer hits occurred. Unfortunately I
forgot to run the game under CPR so I don't know what caused this exactly.
I saved the game at this point.
BUG: the thinking phase of the vanished wizard triggered more enforcer
hits.
I played the game for several more turns until I won.
Now I quit the game and did a run cpr chaos
oh great, when I try to load the saved game it doesn't work! 8(
I'm figuring that this is all related to bogus returns by GetWizardCell
when a wizard has been vanished.
Ok, I just spent half an hour looking around at files, trying to decide
what I'm going to do tomorrow. I'm tired now. I'm going to bed.
STRANGE: I woke up the next morning and whaddaya know? The game from last
night is sitting there in cpr with a BUS/ENFORCER HIT in IsExposedWizard.
(I leave my amiga on almost all the time.)
So the game loaded correctly after all! YAY! I have no idea what caused
the huge delay.
This is all caused by the first few lines of IntelligentComputerSpellSelect
which derives the cell of the wizard, which for a Vanished wizard is all
completely bogus. Leaving this for SAI.
SAI: I will attempt to replicate this problem if I have time. Problems like
this used to occur when warped wizards mistakenly tried to cast spells.
The only likely reason is that something has corrupted the warped bit of
the corresponding wizard entry.
SAI: Vanished objects should never try to select a spell in the first place.
However, the code in IntelligentComputerSpellSelect will indeed fail if it
is called erroneously like this, because their will be a dereference of the
type board[-1].
JC: Ok I fully understand this problem now. Vanished wizards should never
be thinking about casting a spell because their .Warped bit will be set.
So if I ever encounter this bug again I'll know what to look for and can
hopefully fix it.
***************************************************************************
***** End of An Enforcer Hit Bug Related to a Vanished Computer Wizard ****
***************************************************************************
* IMPROVED the speech of "Player One", "Player Two" etc.
* STUPID: A wizard just cast combat on himself and on the next turn he cast
Poison Dagger on himself, thus wasting his combat spell! FIXED by raising
the ranking of Poison Dagger by 4 points to be 1 point higher than Combat +
modified IsStupidCast().
HYBSIL says it fires poisoned arrows. So we should either:
A) Make its Ranged Combat attack recovery or
B) Change the description to say "more powerful arrows" or "deadlier
arrows" or "stronger arrows" or something of that nature.
Which do you want to do?
SAI: Implemented option A. NOW FIXED.
* CHANGED: WoodElf only needs 4 kills to be promoted to a DreadElf.
ReleaseSemaphore(&SourceCode); by JC on March 10th, 1999.
ObtainSemaphore(&SourceCode); by SAI on 990312
* Siphoned off 1998 readme stuff into a separate file: readme.1998.
* Expanded the list of names available at the start of the game. See the
file namer.c for details. Basically names at the start of the game
are randomly assigned from a possible list. It would be easy to make
this a configuration file like "TalkLines" but I have refrained from
doing so because I don't want a massive proliferation of such files.
Players can of course still edit the names at run time.
JC: Hmmmm... I hadn't ever really thought of the TalkLists file as a
"configuration file" that end users would manipulate. I just made it the
way it is to be easy for me to update it. But now that you have mentioned
it -- it really is a user configurable file like spell.prb
QUESTION: Should players be able to edit names?
JC: YES! Absolutely. When I play games against other humans we _always_
edit our names. We even edit the names of the computer wizards to have
their player number after their name.
We could save memory
(by dropping all the gadgets associated with such editing) but
disallowing it. In general I am keen on options like that, but if
very few people use it perhaps it is not worth it. I for one hardly
ever alter my name. ??
PROPOSAL: Amalgamate various configuration files into a single file
TalkLines
chaos.prb
classic.prb
WizardNames (not yet existing)
Default preferences (not yet existing)
I suspect it would take about 2K to implement a full parser for such
a file. (However, these files all have separate parsing at the moment
anyway--so perhaps it would reduce memory usage--it would also
certainly improve startup speed).
JC: I like having seperate files for seperate things. Its nice and logical
that way.
JC POSSIBLE COUNTER PROPOSAL: Simply put all user-configurable files in their
own directory. Config/ Then if a user wants to configure something there
will be some files there each clearly named as to its purpose.
Of course it is entirely possible to play the game for years and never
need or want to edit the probability files. I've only done it once
myself. My real life friends who play the game have _never_ edited the
probability files.
The problem with this idea is that a config directory is more noticeable
and people will be more likely to go in and change things around.
Whereas now, most people don't even think about it and they leave
everything the way it is.
JC: Bottom Line: I'm perfectly happy with things the way they are. People
don't really need to know that TalkLists.txt is editable by them. If
they figure out they can add their own stuff in then let them. It'll be
there for the power users.
PROPOSAL: Drop the menu section of creatures from the editor (the
pull down menus that is, not the graphical method!) This menu
system is really rather redundant given the graphical method and
is harder to maintain automatically when new spells are added.
Finally it has no support at all for non creature spells.
JC: I concur 100%
PROPOSAL: Given that we are tentatively going outside the std A500,
I recommend using #ifdef BIG to surround code to appear only in the
advanced version. This would be preferrable to having to maintain the
old version separately. I can see there are still a few potential
problems, in particular with dealing with the spell files via
Spell Manager etc. I will have to add a new tag similar to Classic
indicating whether a given spell should only be present in the BIG
version of the game.
JC: If you want to try this you can, but it will be entirely your
responsibility 8). Once I finish the 1 meg version I intend to never
look back. All the current gaming consoles like PlayStation have at
least 2 megs of ram. The newest game console, the Sega Dreamcast has
26 MEGS of ram! Most of the people I know who still use A500s have at
least 5 megs of ram on their system. But the real kicker is that once
I implement the graphics upgrade I don't think you can possibly do any
#ifdefs to make it run. The graphics are simply going to take more
than 1 meg, in fact they will quickly be approaching the 2 meg limit.
HINT TO ALL 1 MEG AMIGA OWNERS: For god's sake, buy some more memory!
* Removed traces of TeX from defines.h
* Completely went through spell.c making modifications to
A: Eliminate spell selection gadgets.
B: Make it so we use standard player numbers.
C: Remove TeX/fix comments
D: To do a general audit on the code.
* Okay I finished all the changes for Phase 1 of the spell selection
upgrade and went to move them to my Amiga via a PC disk. Immediately
I had a problem. DOS as usual truncated my Linux/AmigaDOS files names
to 8 letters so that MakeDemoOfChaos became MakeDe~1. Now I knew this
would happen and my Amiga had no problem copying them off the PC disk
onto my harddrive. But then the problems began. The brain dead AmigaDOS
rename command just would not rename the files to something sensible.
I tried all sorts of ways of doing it. Copy didn't work either, it
just insisted on making a new directory every time. In the end I had
to delete them (at least it let me do that) and copy them again from
Linux with shorter names. Another 10 minutes wasted. OK, DOS is real
lame for having such a stupid filename limitation, but AmigaDOS is
just as daft for letting you create files that you can't rename or
copy! I never have these problems with Linux. Well if my Amiga wasn't
so old and slow then I suppose I would be more keen to use it.
JC: the ~ symbol is used by AmigaDOS to mean "not" in pattern matching.
so that you can things like:
LIST ~(#?.txt) to list all files that do not end in .txt.
| is used to mean "or" btw. Anyway, I guess this causes a bug in the
copy and rename commands when dealing with files with ~ in them. 8(
Hint to SAI: Buy a faster Amiga! 8) I have a lot of Amiga friends on the
net with 50 Mhz 060s. That's about 10x faster than our 25Mhz 030s.
And I haven't even mentioned the ones with 200Mhz PPC Amigas.
* Anyway back to the important stuff. The SpellTable now works with
real player numbers. There are new functions in spell.c to deal with
displaying spells for selection using simple mouse events rather than
gadgets. HandleIDCMP in chaos.c has been modified accordingly.
POTENTIAL BUG: Looking at HandleIDCMP I don't see what is stopping the
program from doing an InformationPanel request on invalid information
when the player clicks outside of the normal board. I will test this
as soon as I can get the game to compile again. NO, I JUST OVERLOOKED
ONE IF STATEMENT. The call is safe. NOT A BUG. IGNORE THIS PARAGRAPH
* As a result of my changes the file "gadget.c" is now obsolete and
has been deleted.
* Well it seems some of my changes don't want to compile. So I think it
is time I go to bed and sort out the problem when I am fresh in the
morning. In particular my clever &HST[-1] assignment failed because
it can be done at compile time, although I don't understand why
given that both objects are static. Anyway I'm sure I will be able
to fix that in the morning.
SATURDAY 990313
* I got my changes to compile now. My new names didn't work at all, the wizards
just showed up without names. The spells were not quite drawn at the
correct position and worse the same spell was repeated for the entire
screen. Finally the spell selection didn't work at all.
Okay it is now displaying the spells okay but the selection is not working.
Damn, I've just been called into work when I thought I would have the whole
day for Chaos. At least I managed to put them off until the afternoon. I
should have used my modem so they couldn't call me! Now my Amiga appears to
have locked up during compilation (I'm writing this on my Linux box). I'll
give it a couple more minutes. REBOOT. Okay compilation successful again.
* Phase 1 of the spell selection upgrade is now completed. The spell gadgets
are gone.
* I've run into trouble trying to manipulate the HST[][MAX_SPELLS] structure.
I can't get the compiler to give me a pointer one entry logically earlier
than memory than the first. I want HST[-1]. Normally this sort of thing
works exactly as you would expect, but in this case the compiler just gives
modifiable lvalue complaints, but I don't know how else to declare the
pointer I wish to assign to. The weird thing is that when I use #define
(&HST[-1]) for the same purpose it works without problems. I'm sure that
short *SpellTable[MAX_SPELLS] ought to give me a 4-byte quantity which is a
pointer to a array of MAX_SPELLS short, and maybe it is but the compiler then
will not let me do SpellTable = HST[-1].
Finally got it sussed the relevant line is (from spell.c):
static short (*SpellTable)[MAX_SPELLS] = &HST[-1];
getting the parentheses in there was the key.
* Moved the Dismount gadget up next the query gadget.
* Implemented Phase II of the spell selection upgrade. The spell the mouse is
over is now reported at the bottom of screen. The works harmoniously with
normal cell reporting. The relevant changes are in HandleMOUSEMOVE.
* I decreased the delay for messages to stay on the screen during computer
spell selection. It still seems too long so I will shorten it more yet.
I think it adds to the atmosphere if you have to read quickly, helps
gives the impression of action.
* I've just noticed that computer players no longer use their spells up
(i.e. they are just getting the same spell over and over again). However,
I know why this is happening and it will be easy to fix. NOW FIXED
* Blanked the bottom area of the screen after spell selection.
* Fixed a problem with discarding. Now marks a spell used when it is first
selected so that the player canNOT discard the same spell (this was done
in a completely different way under the gadget scheme).
* Changed printing routines in text.c to const char* to better reflect
their true nature and suppress some compiler warnings (i.e. compiler
will silently promote char * -> const char *, but complain bitterly
going the other way). Didn't do this to WriteNearBottom since it
does not treat its argument as constant.
* Eliminated all warnings in the compilation of chaos.c
* Discovered that it was still printing the last spell list lines at the
bottom of the screen even when they weren't actually displayed on the
right of screen. Modified HandleIDCMP so it no longer does this.
* Modified GetSpellSelection to blank the lower lines after each player
has selected a spell.
* Reduced the delay on the text messages even further. There is now a
constant BASE_DELAY in defines.h which controls this.
* When spell selection occurs now a blank square is drawn over the
selected spell. This helps make things clearer especially when using
the Texas mode.
JC: Cool. Good idea.
* I just discovered that the MagicCastle spell is functioning as a non
spell. Clicking on it is just ignored, it doesn't get used, and you
don't get a chance to use it. This was because MagicCastleID must be
the same as the gadget code for EndID. I modified the way HandleIDCMP
returns the EndID in the case of a spell return to fix the problem. I
was lucky this happened on such a common spell or this problem might
have gone unnoticed for some time. NOW FIXED
* Removed all the no longer necessary references to spellGadgets.
This ends the spell selection upgrade.
WARPING PROBLEMS:
* Hmm. GetWizardCell did seem to have some shortcomings. It now checks
if a wizard is alive and not warped before trying to calculate a cell.
In the case of a dead or warped wizard it returns -1. This will of
course never match a real cell on the board. Previously, a dead wizard
would have been reported at is position of death(?) and a warped wizard
would have returned -(GAMECOL + 1). But this was then cast to an UWORD
so it would have been some big positive number. I'm not sure why this
should have caused problems tho'.
* The three ways things can get warped out are Hide, Vanish, and via a
vortex. All three of these use the WarpOut function and so there should
not be any problem there.
* NEW POWERUP: An orc, goblin, or troll killing an elf, will now pick up the
bow previously used by the elf.
* I just saw the problem where a computer wizard cast sleep on a mounted
creature. There were no other suitable targets nearby, but it still
doesn't explain why that spell was selected in the first place.
NOW FIXED
* Improved the editor so that cutting and pasting a wizard, will cause the
game to correctly register the wizard's position. It will also make the
wizard alive and not warped. I haven't tested this very well yet, put
multiple copies of a wizard at your own risk.
JC: ah... yes I see what you mean. Maybe we should have a different
method for positioning wizards? We just need some way to control the
starting positions of wizards for certain predefined levels.
* I also noted the Docs contain nothing about how to use the editor.
MAKEFILE PROBLEMS: I've been trying to correct the pool.ssc problem for the
last hour now.
* While trying to fix the problem re makefile/pool.ssc, I added a new
creature "Ogre Warrior" to test it.
I've tried several times. I finally got it to automatically recreate
pool.ssc, but it was still incorrect because it did not include the
description for the new spell, thus if threw most of the other spells
off by one position.
This arose because info.c was recompiled before the new index.h file
(dependent on pool.txt) was generated. I've now changed things around
so that "smake newspell" deletes info.o and info.o depends on pool.ssc
which in turn depends on pool.txt. I think this should be sufficient.
* Fixed a bug in image.c that was placing extra carriage returns in output.
* Fixed the editor so that the spell list is redisplayed when the editor
exits.
* Attempted to fix the problem where the bonus spell selection panel is
sometimes made bigger than it should be.
* Fixed a bug pertaining to computer wizard spell selection that was
resulting from my earlier changes to spell selection.
* Discovered that I still haven't succeeding in fixing the make newspell
problem. Now it is not rebuilding chaos.dat correctly!
* Decided that the current system of a lmkfile and makechaos really
sucks, so I rewrote the makefile and it is now just called "Makefile".
(I renamed lmkfile to stinkfile). The new file seems to work much better
but obviously I need to test it a fair bit more yet.
ELIMINATION OF MOUNTED BIT
* Eliminated all occurrences of the MOUNTED bit from the code. Unfortuantely,
I haven't changed all the documentation to reflect this change. Anyway from
now on all testing for wizards should be done with GetWizardCode(cell).
PROMOTIONS UPGRADE
* I added a routine to do sensible promotions on a cell. Several stats now
take the max of the original and the new creature. Not all of them, so there
is still some additional challenges for those deliberately going for power
ups.
* Then I decided that the code in "move.c" for actually testing for powerups
was rather silly, so I rewrote it to use a table rather than a whole pile
of IF statements.
* Then I realized that the table should be generated from the spell files
rather than maintained separately. Therefore, I added tag recognition
for "Promotion" and "ProCount" to the Spell Manager. So now when you want
a creature to get promoted you need only put entries in the corresponding
spell file (see woodelf.spl and ogre.spl for examples). At present the
such powerups can only be specified if they occur once a certain number
of kills have been achieved.
* None of this change does not affects Horse->Thundermare->Iridium or
other powerups that don't just involve bonuses for multiple kills.
* At present the power ups using the new system are:
WoodElf -> DreadElf (4 kills)
Ogre -> Ogre Warrior (5 kills)
Ogre Mage -> Ogre Assassin (7 kills)
Green Dragon -> Emerald Dragon (7 kills)
* Eliminated a warning in the compilation of move.c
SLEEPING/SUBVERSION on WIZARD BUG SOLVED
* I finally tracked down the problem whereby computer wizards having been
casting sleep etc. on mounted wizards when the code looks like it
explicitly rules it out. The problem was that "flags" was declared as a
UBYTE in isStupidCast and DoComputerCast when in should have been
USHORT. I wish the type checking on the compiler was a little more
stringent sometimes. Anyway I believe this change has erradicated the
observed bugs.
* Made the fade twice as fast in Disection spell.
* Changed that Magic Shield spell, so that casting a shield on a creature
with maximum MR causes its MR_Recover rate to increase by one. Hence
by casting lots of shields you can make something *very* magic resistant.
Changed Protection to work the same way.
* Eliminated a warning in the compilation of cast.c
* Fixed the bug in the Free spell.
* CHANGED BoardEffect so that when the effect is for the entire screen
no sound is produced (I found things like "cure" were getting real
annoying because they take several seconds to complete). [Note I am
talking here about the GREENCIRCLEEX effect in cell.c]
META-COMMENT: I've been quite pleased with how much progress I've made in
the little time I've had to work on things. It has been really helpful
having JC's list of bugs with clear things requiring my attention. I note
there are still a fair few bugs on the list to go, so I best get on with it!
* FIXED the bug that was preventing movement after accidently making an
invalid attack. I'm sure this bug must have been introduced as the
result of one of our rationalizations. Anyway it is all fixed now.
* CHANGED: Hybsil when shooting now affect Man and Recover stats making it
more consistent with poison as the description says.
* Made move.c depend on initial_data.c in the Makefile (i.e. depends on
spell information). This is needed because of the promotion.c file which
move.c now includes.
SPELL.C again. I just went over spell.c with my FTC (fine toothed comb) to
try and make it more efficient and save sapce.
* Removed 1 off counters for SpellRank array.
* Removed AddGUISpell as it was the same as AddSpecificSpell
* Made spell.c more likely to compile under Unix (except DrawImage call).
* Fixed potential bugs in board[-1] references
* Replaced various majic numbers with constants.
* Made use of Spells variable more logical.
* If io.c didn't use Spells then Spells could be made static.
* Most places using SpellTable[Player] in a loop have been simplified.
* The order of certain conditionals in computer spell selection has been
changed for speed. Most conditions like if ((a or b) and c) are much
better written if (c and (a or b)) because of short-circuiting eval
of these expression, but great care must be taken in general because
of implicit assumptions about ordering.
* Updated documentation in spell.c
* SpellProbability and DisplayedSpells are now static.
* Some trivial functions are now __inline (perhaps some of the simplest
cases in predicate.c could benefit from this as well).
* MAX_SPELLS has moved from defines.h -> spell.h.
* Fixed a few type anomalies.
* These changes saved 1128 bytes in the developer version.
ENFORCER HIT: There was an inforcer hit on line 27 of text.c corresponding
to a call to Text (probably with an invalid char * pointer). Since this
occurred when I was experimenting with spell.c and it has not repeated I'm
ignoring it. NOW FIXED
MAKEFILE TESTING: I am now make an archive and doing a make from it to
test the new makefile. Okay, I had to make two minor changes, but basically
it worked. I've just noticed that my new makefile does not include options
for making anything other than "developer" version at present. I will do
this simply by including various option lines. Therefore to make a version
you will have to select the correct option lines from the top of the file.
* Improved make clean to delete .h and .c files which are automatically
created.
* Changed the makefile to include options for the 68000 no editor release.
* Changed the makefile to include options for the 68020 release.
* Changed the makefile to incoude options for the demo versions.
NOTED: During compilation of release and demo versions there are many more
compiler warnings about unused variables. I can see two reasons for this:
First some are due to the optimizer (not a lot we can do about those), but
a few are due to #ifdef's not be present around some declarations where
they should be. There are also some warning about possible unitialized use
of variables, these ought to be checked more carefully as they are potential
bugs (if such usage ever actually happened).
IO BROKEN. Discovered that loading and saving is broken as a result of my
changes regarding wizards names. NOW FIXED.
Discovered that my changes to spell.c have caused some anomalies, in one
function I was returning a spell probability rather than a spell! Since
this code was replicated in 3 places in spell.c I implemented a new function
GetSpellFromProbability to make sure they are all homogeneous, now if there
is any problem with silly spells be granted there is only one place where
the code is likely to be wrong. This particular problem was the cause of
the enforcer hit noted above.
I had invertently damaged the Texas option, it now was trying to force you
to discard even when you have no spell left. FIXED.
BUG: I've noticed that when agent casting is turned on they will still
cast bad spells on their team mates when no other targets are available.
COMPLETED: I finished the implementation of the Passage spell. It is no
longer a wizard power-up but a single invocation. The code is rather like
that for PlasmaBeamHandler. This Wizard structure no longer has a "passage"
bit, changed all references to it accordingly. Note this will break io.c
even further, but I intend to fix that problem next. All spells in the game
are now up to date, the only object not yet functioning sensibly is the
"exit". In the mean time it behaves like a normal inanimate, so I'm just
leaving it like that for now.
IO REPAIRS: It turns out the problem with loading and saving games had
nothing to do with my name changes, but that the loading routine was broken
when presented with a name containing whitespace. The culprit has been
modified. Old files should still load (including some that would not before).
However, due to changes in the Wizard tags some wizard powerups will not be
encoded exactly the same, I don't expect this to create any problems,
DELETED Makechaos, stinkfile (was lmkfile), and MakeDemoOfChaos, they are
now all redundant.
CONSISTENCY IMPROVEMENT: When you select sound off from the game menu it now
turns off sound for the independents during both movement and casting. This
makes playing against 99 generators run considerable faster.
PASSAGE: Improved the comment on the Passage spell to reflect that fact
that a mounted creature or mediation can also make passage.
BUG: Wizards were not clearing wizards[].spell after using a spell. This
meant a wizard kept repearing the last spell selected when "coercion" was
in effect. While this was quite neat when it happened, it is not what is
meant to happen with coerced wizards. NOW FIXED.
BUG: Computer wizards (when either exposed or mounted) often choose not to
move. No problem with that. Except sometimes they are adjacent to enemies
cells and they still don't move. In such circumstances it would be logical
to at least make an attack OR an attempt to move away.
DELETED creature selection menus from editor and replaced them with a player
selection menu. Each player also has a hot key RA-1, RA-2, etc. so we have
the best of both worlds.
Did a "smake archive" and rebuild from the archive with no errors. Good.
Fixed another bug perhaps causing problems with warped wizards.
OUT OF TIME. Well I'm off to Australia on Saturday morning, so I am going to
send you the archive now, so I have 1 day to check you received it.
This is the current status:
* I addressed all bugs except those about IDCMP.
* I have still not throughly examined the situation with warped wizards.
* There may be new bugs in spell.c due to the extensive changes I made there.
ReleaseSemaphore(&SourceCode) 8-April-1999 by SAI
ObtainSemaphore (&SourceCode) 8-April-1999 by JC
* BUG: Place the mouse pointer over a cell or spell on the edge of the board.
Now move the mousepointer to off the board and back. The display is now
blank (it doesn't say what you are pointing at). You must first move to
ANOTHER cell and then back. This bug has been around for a long long time
on the board and now it is there in the spell list also. NOW FIXED.
* BUG: I am playing a game as player 2. When I put the mousepointer 1 pixel
below the bottom left spell it says "Crocodile". When I put it 1 pixel
under the bottom right spell it says "Repulsion". Even though there are no
Crocodiles or Repulsions on the board, nor are those the next 2 spells in
my spell list. Oops I clicked the mouse button and now I've selected
"Repulsion" as my spell! Now I discarded the imaginary Crocodile. Ok it
really let me cast the Repulsion. NEXT TURN: The bug is now gone.
NOW FIXED by tossing a -1 into the math equation.
* ADDED some new wizard names.
* BUG: Ok I'm playing a test game. On turn 1 I vanished Player 8. During
the next spell selection I got that exact same enforcer hit in
Chaos.c/GetSpellSelection/IntelligentComputerSpellSelect/IsExposedWizard
that I reported before. Now that I realize this is a problem with not
checking the .warped bit all is NOW FIXED.
* FIXED the warped problem in sqDistanceFromNearestTeamWizard and
sqDistanceFromNearestEnemyWizard now that GetWizardCell(p) returns -1 for
a warped wizard. Though maybe I should be checking the .warped bit
instead. I just don't know which method will be easiest to maintain.
BUG in the sasc "diff" command. It can't handle files with extremely long
lines. Numerous enforcer hits are generated and then the computer crashes.
Found by attempting to diff single.c with the previous version.
What is the purpose of all those CONST keywords that you added into text.c?
* EDITED descriptions of OgreWarrior, Ogre Assassin and Ogre Mage.
Since the Ogre Mage description says he is trained in the medical arts I
gave him special combat of -1 against life.
* Changed Texas Trade'em into Texas Trash'em since you don't trade spells
in, you trash them (discard them).
* PROBLEM: when you cast a spell it tells you the range, which isn't very
useful. I would much rather know the multiplicity so I know how many
attempts I get with the spell. I've been wanting this feature since the
first time I played the game years ago; I could never remember how many
attempts of Justice, Dark Power and the various tree spells I was going to
get. This made it difficult to plan where to cast my trees. NOW FIXED.
* SHORTCOMING: Q key does not work on the spell list. NOW FIXED.
* BUG: At the beginning of a person's movement phase there is text left over
from the previous person's movement. NOW FIXED.
* 2 NEW SPELLS: Magic Wand and Vodka. Neither have a real graphic yet. I
won't make any graphics till I implement the graphics upgrade. I just had
to program these in real quick while I still remembered where to put the
code fragments that make them work.
Hint to myself: If you add new stuff to the wizard structure then you must
do a smake clean or there will be all kinds of horrible, strange and even
humorous bugs (like computer wizards suddenly becoming human wizards,
humans getting to pick computer wizard's bonus spells for them, and dead
wizards that still cast spells). Found this all out the hard way.
************************************* TEST GAME ************************
I'm playing a test game as player 2 against all the computer controlled
wizards.
Turn 1: Player 1 casts Plasma Beam on nobody. Moves away from his enemies.
Turn 2: Player 1 casts Plasma Beam on nobody. Moves away from his enemies.
(he is now on the edge of the screen).
Turn 3: Player 1 casts Plasma Beam on nobody. I guess he is attempting to
move off of the board because now there are zillions of enforcer hits then
the game locked up.
All the other wizards and creatures acted normal.
The enforcer hits didn't put cpr on a line of code. It just put it on some
assembly code, presumably because the hit happened in an OS routine. So I
have NO idea what was causing all this. 8(
NEXT TIME I PLAY A GAME SAVE IT EVERY TURN!
All this was caused by an uninitialized variable. When I added the Vodka
spell I made a new variable "wavy". I had:
UBYTE wavy; instead of the correct UBYTE wavy=0;
So the wavytask was being stopped even though it wasn't running. This
resulted in memory being freed which hadn't ever been allocated in the
first place. A really good way to crash the computer.
It was all just a simple little mistake. ALL FIXED NOW.
**************************************************************************
* BUG: Computer players keep casting Demonic touch and then aborting it even
though there are low-combat creatures nearby! NOW FIXED.
* REDUCED Thundermare combat to 12.
* BUG: I just killed a wizard and for my bonus spell I picked the Crimson
Death. It says its probability is 226% instead of -8% like it is supposed
to. NOW FIXED.
* BUG: the "q" key no longer works on the alt-o spell list like it used to.
I found this by pressing alt-o in the editor. Then I clicked on the Ghost
which showed me a list of all undead flying creatures. I wanted to read
the description of the Crimson Death but the Q key did not work. 8(
Fixed by SAI. NOW FIXED. But OOPS I actually wanted to see the stats of
the creature, not read its spell-description. Maybe we should have "q" and
"Q" in the editor? ???
* BUG: the 2nd tier of alt-o objects does not erase the first tier like it is
supposed to. Fixed by SAI.
**** Another Playtest game *****
Somehow there is a sleeping lion that is being ridden by a computer wizard.
The lion just moved. Then it cast a Griffon. I don't know how that happened.
The mounted wizard has Irvine's invulnerability. Couple of turns later:
now the lion has died and there is an empty cell that says
Nothing (Torquemada) has 31 life, 7 recovery, 4 MR, 15 Man, 15 Intelligence
and 1 combat. It says that all its original stats were 0.
It has the following wizard powerups:
Invulnerability, Recover Boost, Elf Boots, Brain Boost, Armor.
I don't know what caused this and I don't know how to fix it.
********************************
* BUG: A sleeping Vortex is moving around the board! NOW FIXED.
* Vortex description no longer says it leaves a trail of distorted space in
its wake.
**** JCformat Rules! ***********
I had a mysterious error from the C compiler like this:
void HandleMOUSEMOVE(int mx, int my, int sp)
chaos.c 2380 Error 218: declaration found in statement block
I looked at the code prior to this line and couldn't see the problem.
I was even looking directly at the area of code where the problem was but
didn't see it for whatever reason. Then I used JCformat on chaos.c
and it told me: Error in line 2235: Ending does not match beginning. Thus
I fixed the problem within 5 seconds of running JCformat when in the olden
days before JCformat I'd have gotten frustrated and just went off and
watched some tv to take a break and would have lost hours of productivity.
*********************************
* NEW FEATURE: The "c" key now works on your spell list! I've been wanting
this feature for years. Now that I've got it, it is totally cool! You
can _instantly_ determine all the potential targets of any spell in your
list. This is so much easier than having to read the 2nd info screen of
a spell to see if it is allowed to be cast on certain types of things (like
growths or inanimates or corpses) etc. etc.
* UPDATED THE DOCS for "c" key and multiplicity.
Monday, April 12th, 1999: New phone line installed. I now have reliable
24 hour access to the net. If the Chaos internet upgrade was completed
today I could immediately start running a full-time internet game server.
**************************************************************************
ALGORYTHMIC SPEECH UPGRADE
**************************************************************************
* BUGS: The speech for Lich Lord and ShapeChanger doesn't work due to a
typographical error in the phonetic spelling. All these years I thought
you had intentionally left out speech for the ShapeChanger. Oh well,
its NOW FIXED.
* FIXED the awful pronunciation of "Justice", "Castle", "Confidence",
"Coercion", Ogre", "Ogre Mage", Ogre Assassin", "Ogre Warrior" and
"Falcon". Justice had been pronounced "Justayce" for years and "Falcon"
had been pronounced "Foilcon" for years. NOW FIXED.
* PROBLEM: the spell manager issues warnings when I put a period at the end
of a phonetic string. There should not be a warning for this. Erroneous
warnings are also issued for the chars: ,()? NOW FIXED.
* IMPROVED PRONUNCIATION of ALL SPELLS. I should have done this years ago,
its so easy. And I only intend to use the algorythmic speech for a few
more months before I replace it with digitized speech. Oh well. There
were just sooo many spells which were using 1 or more wrong phonemes.
Certain spells had the correct phonemes but had the stress reversed
(stress on 2nd syllable when it was supposed to be on the first or vice
versa.)
Almost every single spell file has changed now. COMPLETED.
Certain words like Agathion, Achiyalabopa, Abath, Amphisbaena, Bodak,
Hybsil, etc. are not
in my dictionary and I have never heard them spoken by a human being before
so I really have no idea how they are supposed to be pronounced. I'm just
leaving mysterious words like this unchanged.
Apparently people in New Zealand don't pronounce the letter "r".
I found many words, e.g. "Wizard" which simply had no "r" phoneme in them
like as if you had intentionally removed it. Since we americans pronounce
our "r"'s I have changed this. Example: "WIH4ZAXD" is now "WIH4ZERD".
Similar for "Vampire" and "Vulture".
If you don't like this we'll have to have an option for "American Speech"
and "New Zealand" speech.
Some spells like Aviary didn't even have speech. Now they do.
I didn't change the speech for Goblin Bomb and Hidden Horror so that people
can sneakily cast them without their opponents noticing. hehehe.
**************************************************************************
* PROBLEM: We were playing a multiplayer game. At some point while most of
us were out of the room somebody moved some stuff around on the table by
the keyboard. This resulted in a joystick falling onto the keyboard and
resting on the return key. This made everyone end their turn at about 1
second intervals. I know this isn't much of a _real_ problem but still...
I have now implemented End of Turn Confirmation. NOW FIXED.
* End of Turn Confirmation addresses Joseph Dixon's complaint about the
end-of-turn gadget being at the bottom of the screen and JJ's complaint
about it being at the top of the screen. It no longer makes any
difference where it is since if you accidentally press it it will still
bring up the requester and ask if you are sure you want to end your turn.
******** CastInfo + Spells Upgrade **************************************
NOTE to SAI: In my opinion there should be CAST_NOWIZARDCELL and
CAST_NOEXPOSEDWIZARD flags for IsIllegalCast to test. This would allow us
to simplify the hints of certain spells since hints are not needed to
prevent something that is illegal in the first place. The reason I want
this is that if you point the mouse at the "Free" spell in your list and
then press "c" it highlights all the wizards on the board even though that
is a guaranteed failure. Such bits would improve the gameplay, usage and
implementation of Alter Reality, Betrayal, Dark Power, Exorcise, Free,
Kill, Nuke, Sleep, Subversion and Wake.
* Now Implemented aforementioned CAST_NOWIZARDCELL and CAST_NOEXPOSEDWIZARD
bits into CastInfo.
* CastInfo[] is now ULONG instead of UWORD. I had to make a small change
in spellman.tex to accomadate this.
* Betrayal, Free and Subversion can no longer be cast on Artifacts.
In my opinion, if a spell is guaranteed to fail on a certain type of cell
then there should be a CAST_BIT for that in the CastInfo[] array.
* FLAW c key on Raise Dead says you can cast it on your own wizard!
We probably either need a CAST_NOLIVING bit or a CAST_MUSTBEDEAD bit.
This problem is solved below.
* AAAAAAAAAUUUUUGGGGHHHHH!!!! MAJOR BUG!!! I just played a test game and I
just cast Raise Dead on an enemy wizard. The Enemy wizard wasn't dead.
He is now MY wizard and he's undead!
You can also cast Raise Dead on your own wizard to make him suddenly
become undead! This is all caused because of the
lame way of defining classes of objects according to the highness or
lowness of their ID number. Someday I'll go through and eliminate all that
stuff like I've been wanting to do for years. But for now I'll just hack
in a quick fix. NOW FIXED.
* Ok now I've removed all that ID checking code crap and replaced it with
IsCreature(cellp) instead. Well how about that, there are no
isCreature(cell) or IsCreature(cellp) macros.
* NEW MACROS isCreature(cell) and IsCreature(cellp) and isIDcreature(id)
NOTE: The game is a database. Therefore all data should be contained in
the database and not in any way be dependent on the numerical value of the
ID number being above or below some other numerical ID number.
All occurences of things like:
IF somethingID <= ImpID
should be replaced with something like:
IF isIDCreature(somethingID) // or IF isCreature(cell) // or IF IsCreature(cellp)
* REPLACED all occurrences of > ImpID with the appropriate creature macro
and all occurrences of <=ImpID with the appropriate creature macro
in cast.c, all spell files, move.c, and some of the ones in spell.c
* Note to SAI: As I was doing the above I found some code in cast.c that can
never be executed. You should probably look at it. Just search for
the LAST occurrence of CatLordID and you'll see it. SAI Fixed the code.
* There are still numerous occurrences of ImpID sprinkled around in various
files but some of them look like they might be using it in a strange way so
I didn't mess with them + I'm very sleepy at the moment. I'll leave the
others for SAI. ALL occurences of ImpID have now been replaced by SAI
except for the ones in spellman.tex and reincalc.c.
The ultimate goal is that someday there should be no references of > someID
or < someID.
Ok, now the game is completely messed up. I just now found out the hard
way that InitialData[] only exists up to the highest numbered inanimate
object. So the isIDcreature macro doesn't work when given a magic spell id.
(For example the game thinks the VodkaID is a creature when in fact it
is just a magic spell like Teleport.)
Ok, but the isCreature and IsCreature macros seem to be working ok.
* CHANGED isIDmacro from:
#define isIDcreature(id) ((InitialData[id].Stat & CREATURE_STAT))
to
#define isIDcreature(id) (id<=Wizard8ID and InitialData[id].Stat & CREATURE_STAT)
**************************************************************************
****** Artifact + Sleep Problems **************************************
Casting sleep on an artifact puts it to sleep but since its owner is
calculated right after that, it never says that it belongs to ASLEEP.
Thus you cannot see if it is asleep or not.
If someone casts sleep on an artifact that belongs to you it will be
technically put to sleep (so it will collapse at some point) but it will
still belong to you and you can still attack with it.
* SOLVED by modifying CalculateArtifactOwners to ignore sleeping artifacts.
***********************************************************************
* REMOVED Temporarily all the ADPCM code from the game since I probably
won't really use it for a few more months till the OS2.04+ version and to
save memory on the FINAL 1 meg version.
********** Major playtest game of Jerry vs. James. ********
Jerry started with 3 wizards on his team 2 were controlled by him and a 3rd
was computer controlled. I started with 2 wizards on my team controlled by
me. The remaining 3 wizards were all computer controlled and on their own
team. No artifact, no scrolls, no Texas Trash'em, 3 generators.
* BUG: Sometimes computer controlled wizards attack their ally's
creatures. This only applies to computer controlled _wizards_. The
Creatures of the wizard don't get engaged to or attack allies, only the
wizard himself. Basically computer wizards are trying to mount their
ally's mountable creatures. The problem was in ChooseDestination
NOW REWRITTEN AND FIXED.
BUG: I'm not sure what I did but I may have rapidly hit the lmb then rmb
near the top of the screen (but I don't think I was in the menu area, more
like the 1st or 2nd row of cells). The game then said "Mind Flayer" even
though there were no mind flayers on the board and in fact the ENTIRE area
of the board that I clicked in was completely empty. It said I had 0
movement points and I couldn't moved or cancel or do anything 8(
Essentially the game was locked up since I couldn't really do anything.
This happened in a really important game between myself and my brother.
Luckily I was running the game under cpr so I hit escape and single stepped
through the code and FORCED the new_cell variable to be USER_RMB which
cancelled my turn. I guess this proves that the RMB was being trapped when
it wasn't supposed to. Anyway, once I did that the game proceeded
normally. I remember seeing this bug before a very long time ago. Perhaps
1 or 2 years ago. I may have just exited from an info screen right when
this happened. I don't know for sure. Leaving this for SAI.
JC fixed this bug months later in November 1999.
* BUG: Somtimes computer wizards cast Plasma Beam for 2 or 3 turns in a row
on empty space. Leaving for SAI. Fixed by JC months later on October
20th 1999. NOW FIXED.
Jerry cast Triple on the first turn so I cast Coercion on the first turn to
negate that. However, he was coerced for 3 or 4 turns but this apparently had
NO EFFECT on his Triple spell once the coercion wore off. When the coercion
wore off, he still had his triple in force for a long long time thereafter.
Is that the way it is supposed to work?
I always thought that spells like Triple work for a set number of game
turns, regardless of other effects.
We found out that many spells, like Torment and Coercion, hurt your allies
as well as your enemies. Is that the way it is supposed to work?
**************************************************************************
TORMENT BUG #1:
My wizard cast Torment and it lasted a few turns for each wizard, including
my Ally wizard. So I simply didn't cast any creatures for a few turns,
waiting for it to wear off. But it didn't wear off so I waited a few more
turns. This went on for around 10 turns and it never wore off so I figured
it must be set to last for at least 1 creature cast so I cast a tormented
creature and sure enough that triggered the removal of the torment. The
spell description says "... the effect will hold for several turns of each
wizard".
So either
A) The spell needs to be reprogrammed to really work for several TURNS or
B) We need to change the docs to say "creature casts" instead of "turns".
* TORMENT description changed to say that it works for several
"creature casts".
TORMENT BUG #2:
The Torment spell description says that it influences the creature casts of
"the opposition" when in fact it influences the creature casts of ALL other
wizards including your allies. So we need to either:
A) Change the description to say "all other wizards" or
B) Reprogram the spell to really only work on opposition wizards.
* TORMENT description changed to say that it affects "all the other wizards"
* COERCION description changed to say that it affects "all the other wizards"
I'm not saying this is how I want Torment et.al. spells to work. You made
the spell so its up to you. I don't know how they "should" work, nor do I know
if it even makes any difference. I'm just saying what I have done for the
time being to correct the incongruencies. However a spell works, its
description should be accururate and not misleading.
****************************************************************************
WEIRD BUG: I cast a tormented Crocodile. At some point (1-3 turns later) the
crocodile mysteriously healed back to full life! The same thing happened
to all 3 of Jerry's tormented Vultures! How is this possible?
Leaving for SAI.
* BUG: Jerry cast Restoration on my cloaked wizard and it technically removed
the cloak but it never redrew the wizard, so for the rest of the game it
looked like he was cloaked on the board, but in fact was not. NOW FIXED.
* BUG: Jerry cast "Orcs" while having a Magic Wand so I told him to press
the "c" key to see where all he could cast his orcs but the "c" key didn't
work! It doesn't seem to work on any multiplicity spells. NOW FIXED.
BUG: "c" key over an Orcs spell in your spell list highlights your wizard
and NOTHING ELSE. This is because the Orcs spell is defined as CAST_FREE.
Something needs to be done about this so that all multiplicity spells will
correctly highlight all the legal cells like they are supposed to.
Leaving this for SAI.
It was an extremely close game up until turn 20.
Game over on turn 30. Jerry killed me. I don't think he could have killed
the independents though, as there was a Devil walking around + other stuff.
***************************************************************************
* FINAL 1 MEG VERSION DONE on April 19th, 1999. The disk is 99% full with
only 9 blocks left. Here is a list of the main floppy dir.
Directory "df2:chaos" on Monday 19-Apr-99
fonts Dir ----rwed 01-Dec-98 19:25:17
Music Dir ----rwed 16-Jan-99 14:29:53
talklists 9354 ----rwed 14-Mar-99 09:52:32
Chaos 343076 ----rwed Today 20:17:05
chaos.prb 6800 ----rw-d Today 16:48:00
classic.prb 6543 ----rw-d Today 16:48:00
pool.ssc 43545 ----rwed Today 16:58:57
Start_Chaos 311 ----rwed 31-Mar-98 05:49:42
Start_Chaos.info 2570 ----rw-d 01-Dec-98 20:10:17
chaos.dat 66688 ----rwed Today 17:02:00
8 files - 2 directories - 953 blocks used
Memory Consumption during Intro:
Chip RAM: 467608
Fast RAM: 382376
Memory Consumption during Setup:
Chip RAM: 459224
Fast RAM: 469624
During the game:
Chip RAM: 267000
Fast RAM: 482728
During info screen:
Chip RAM: 281000
Fast RAM: 483384
During the "About" Requester:
Chip RAM: 369000
Fast RAM: 483488
During the "Save As" Requester:
Chip RAM: 299400
Fast RAM: 486952
During the "Quit Game" Requester:
Chip RAM: 317800
Fast RAM: 483344
* PLAYED 1 test game on 7Mhz 68000. Everything seemed to work ok, but the
"End Turn" confirmation was too slow. Oh well.
* Chaos_2.5r and Chaos_2.5d are both in /ChaosArchives/ directory.
* Uploaded v2.5d demo version to Aminet. Upload rejected as usual.
* Worked on music for several days then:
**************************************************************************
HARD DRIVE CRASH!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
ALL PARTITIONS LOST !!!!!!!!!!!!!!!!!!!!!!!!!!
DAY OF DOOM!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
AAAAAAAAAUUUUUUUUUUUGGGGGGGGGGGGHHHHHHHHHH!!!!!!!!!!!!!
I can't access the source code, my word processor, my email, the internet,
the compiler.... NOTHING...
This was EXTRA bad because I'm using an Amiga 3000 with the ROM in a file
in DEVS:Kickstart, which means if the hard drive doesn't work then neither
does the computer.
After getting really depressed for a couple of days I finally started
looking for my old 120 meg HD that used to be in my A3000. That took an
entire day and I was unlucky enough that it was in the LAST place I looked.
(as in I gave up because I had looked EVERYWHERE except this one last box,
it was the only thing I hadn't looked through... well whaddayaknow there it
was.)
Ok, so I put the old drive in and I could at least boot up my amiga.
LUCKILY I was smart enough to have installed some basic internet software
on that drive before removing it and throwing it in the shoebox or I would
REALLY have been dead in the water. Unfortunately I had only tcp/ip and
irc installed. So no web browsing or ftping for me. 8(
It was like being teleported back in time to 1989 8(
Well after talking to numerous people on the net and doing lots of research
about hard drives for a whole week, I finally figured out the problem and the
solution.
The problem was: The original AmigaDOS had a limit of a 4gig drivesize.
(I had thought it was a 4gig partition size). That's right, in 1985 when
Bill Gates compatible PCs had a 40 meg limit, the Amiga had a 4096 megabyte
limit. The amiga has a 32-bit operating system and the largest number that
a 32-bit number can hold is exactly 4 gigs.
WHAT HAPPENED: When I wrote a file to the hard drive it "wrapped around"
from the 4gigth block to block 0 and overwrote the Rigid Disk Block and
associated data blocks that keep track of what partitions are on a drive
and where they are located. This happened because the HIGHEST partition is
my WORK partition of 1.6 gigs size and this is the one I put all my stuff
in. It was 49% full at the time of the crash.
The solution is any 1 of the following:
A) Don't use drives of larger than 4 gigs.
B) Use drives of larger than 4gigs but don't actually use more than 4 gigs
of its space.
C) Upgrade to the newest FFS (FastFileSystem) which is 64 bit.
Since my drive was already formatted under the old FFS I just took the easy
way out and did option B. I repartioned my drive to not use the upper 20
megs of space. Losing 20 megs out of 4,300 megs is irrelevant.
HOW I RECOVERED MY DATA: I just used RDB-Salv from Aminet which went in
and figured out where my partions were, how big, etc. It worked perfectly
on the first try. Then I repartioned my drive with HDtoolbox to the
correct specifications (the exact same ones as when I set it up
originally). Then I used DiskSalv from Aminet to salvage all files off the
1st partition. The 1st partition is my boot partition with workbench and
it was partially overwritten in the crash.
Disksalv recovered EVERY file except for 3. 1 of the files was easily
replaced from its original source. The 2nd file was just some useless
program I had downloaded once upon I time so I just deleted it. And the
3rd file was a mysterious unknown and unused file of complete irrelvance to
anything (I guess it was left over from some old program I once deleted).
There were numerous other small problems that arose from me switching my
hard drives around, these were related to improper SCSI termination (since
I don't have the manual to the 120 meg drive) and to not doing "save
changes" in HDtoolbox.
Recovery operation completed on May 15th, 1999. For the previous 12 days
no work was accomplished on Chaos and I got really stressed out.
HARD DRIVE REPAIRED
***************************************************************************
***************************************************************************
JJ BUG REPORTS on v2.5r:
* BUG: Game does not work. This turned out to be because he had renamed
the game dir to "Chaos 2.5" and the path determination code couldn't handle
spaces. This never would have happened if we had made the game require
OS2.04 or higher since then we'd just use PROGDIR: NOW FIXED.
-------------------------------------------------------------------------
* LOAD/SAVE BUG: If you save a game with wizards in trees then reload it
there is a MAJOR problem: When the tree collapses the wizard is invisible
and "he's there but not really there" which makes him impossible to kill.
Ok, this was because the WizardInfo structure said UBYTE id instead of
UWORD id. NOW FIXED.
* LOAD/SAVE BUG STILL THERE: The loading and saving routine had the
following problems:
From the Load Routine:
// j is an int so this doesn't work right.
// This reads the wizard id into the upper word of the int j so the id
// will ALWAYS be wrong.
fread ((char *)&j, sizeof(USHORT), 1, fh);
wiz->id = FileCode[j];
From the save routine:
// j is an int so this doesn't work right
j = InternalCode[wiz->id];
fwrite ((char *)&j, sizeof(USHORT), 1, fh);
// This Writes out the upper word of the int (which is always 0)
ALL NOW FIXED.
--------------------------------------------------------------------------
When he saves a game it says "save complete" but then the hard drive
flashes a few seconds later. He thinks that if you don't WAIT for this to
happen that it messes things up.
* COMPLAINT: He always plays as player 8 so when he saves the game he has to
WAIT for all the first 7 wizards to reselect all their spells. Therefore
he doesn't bother saving the game anymore since its too annoying.
This same thing has been bothering me (JC) for some time now but since I
always play as player 1 or 2 it didn't bother me badly enough to try to fix
it. I was going to fix this problem when I add internet capability to the
game since the current gamesave just WON'T work with internet play.
It must be modified to allow for saving at ANY person's spell-selection
point, not just player #1's.
But since it is such a problem for JJ we might need to fix it sooner.
TEMPORARILY BAND-AID PATCH FIXED by reducing BASE_DELAY from 2 seconds to
2 tenths of a second. IMPLEMENTED.
save at beginning of spell selection phase.=YUK.
* MAJOR BUG: highlight ? with mouse then click on some cells. It will lock
up quite frequently. Usually happens with cells on the upper right of the
board.
Note from JC:--------------------------------------------------------
I have now verified that this bug is NOT caused by his Qmouse Mouse
accellerator. It is in fact caused by a bug in OS 1.3 and below. It
happens when pressing the mouse button (the right one I think) in the dead
area between the 2 screens on the information panels.
I absolutely, positively DO NOT have this bug on my A3000 with OS 3.1.
There may be a work around for this but I don't care. Its just another
good reason to hurry up and make the game require OS 2.04 or higher.
---------------------------------------------------------------------
ABOVE BUG NOW FIXED on OS 1.2 / 1.3 by hacking in some "IF OS <= 1.3 THEN
TrapRMB" code.
* MAJOR BUG: Right Mouse Button on load/save screen under OS 1.3 locks up the
program. This is caused by the fact that the requester opens its own
window without the TRAPRMB bit set. I don't know any way to make the
requester open a TRAPRMB window. So we need to work around this bug some
other way or just require OS 2.04 or higher. OK, I have simply turned
off the MENUVERIFY feature for the HiResWindow during the loading and
saving screens and now it works perfectly under OS 1.3. NOW FIXED.
* MOVED TrapRMB and PassRMB #defines from chaos.c into defines.h
* COMPLAINT: he puts in the wizard names for each player with a number on
the end to indicate their player number. Then he plays a game. Whenever
he starts a new game it then RE-randomly generates all the names over again
and he has to re-enter the numbers on the end. Ok, I have now fixed this
so that names are only randomly generated once when you first load the game
and then never again. NOW FIXED.
END OF JJ Bug Report.
**************************************************************************
* FLAW: A human wizard can no longer attack a tree that is occupied by
another wizard. It just says "already occupied".
I Changed this to not attack if the tree is occupied by an ally, otherwise
attack the tree even if the tree itself is on your team. Ditto for all
meditations. This change does not affect computer wizards and does not
allow any of your own creatures to attack your own meditations.
NOW FIXED.
* NEW FUNCTION GetWizardCodeSameTeam to support above feature.
* SPEEDED UP: Lissajous box menu thingies.
* BUG: I move my player 2 wizard into my ally's dark citadel and now I can't
move him out! He's trapped! This was caused by the the fact that the
"clear movement bit" code was OUTSIDE the main loop! So the MOVED bit was
only being cleared after all players had moved! Thus I never noticed this
since for player 1 (who I usually play) the MOVED bit was properly cleared.
But for ALL other players the MOVED bit was set totally wrong. I went back
and looked at all the old source code versions on my HD and they all have
this same bug! ack. NOW FIXED.
* Compiled a new v2.5 and this is REALLY the final 1 meg version.
Around June 1, 1999?
* My car blew up. No work accomplished for 2 weeks.
* bought a used car. It broke down within 24 hours. No work accomplished.
* My mom's car broke down. No work accomplished.
* CHANGED: Killing a generator now allows you to pick from 4 bonus spells
instead of only 2; thus reflecting the extreme difficulty of killing a
generator.
* BUG: Computer wizards cast vodka on artifacts a lot, this effectively wastes
the vodka spell. I have now simply removed the CAST_ARTIFACT from the
CastInfo field so this is NOW FIXED.
Alleged Bug: I just cast Seperation on a cloaked computer wizard and it
didn't seperate him!!! He is still in an alliance with all the other
computer wizards!!!!! No, that is just the way the spell works. You don't
cast it ON anyone. It is a cast_free spell that just seperates yourself.
* BUG: If you save the game while Tormented, then reload, you suddenly have
a MagicWand and Vodka powerup. NOW FIXED.
* BUG: Depth removes line-of-sight requirements but its description says
it is only supposed to allow unlimited range without changing line of
sight requirements. This is due to a limitation in the spellcasting engine
that any spell with max range automatically does not require line of sight.
There is currently NO WAY to have a spell have unlimited range yet require
line of sight. So we need to either reduce the range of Depth down to 14
and edit the description accordingly, or we need to change the description
of depth to say that it removes line of sight requirements also. Or we
could change depth to be that it doesn't change range but it removes line
of sight requirements. Or ???
OK, here is what I did: I changed the Depth description to state that you
get unlimited range + you don't need line of sight.
* NEW SPELL: Crystal Ball. This spell removes line of sight requirements
for all spells.
* NEW SPELL: Ubiquiscope. The Ubiquiscope is like a combination of Crystal
Ball + Magic Wand.
* 11 NEW SPELLS: Fly, Singular Earthbind, Dual Earthbind, Nonarchery, Convert,
Sword of Sassenrath, Cursed Sword, Mount, No Mount, No Grow, The Exorcist.
I haven't made any new graphics for any of my new spells. I'm hoping this
will help motivate me to do the graphics upgrade. The only exception is The
Exorcist which I pirated the graphics from the Bandit and made the Bandit
use the graphics from the Annis, then I deleted the Annis since it didn't
seem to have any real purpose. The Exorcist still needs to be redrawn so
that he is holding a cross in his hand.
BUG in Spellmanager: The following lines from Ubiquiscope cause a fatal error:
ComputerAssist:
Imagery: STATIC
Leave this for SAI.
BUG in something: When processing the 2nd image of the new animated bandit
the compilation stops with "Invalid Section Code". I have temporarily
worked around this by making the bandit be STATIC once again. Leaving this
for SAI to fix.
-------------------------------------------------------------------------
I stayed up all night playing a serious game.
Lately I've been playing the game a lot with me controlling 1 wizard
against all the other computer wizards who are all on the same team against
me. 99 spells, unlimited turns, 6 artifacts and 6 scrolls, 4 artifacts,
Texas Trash'em, Computer Level 0, no classic, no impurities, no agent
casting. I can almost always win. I frequently win under 20 turns.
Maybe I was just having good luck?
So today I played as above but with only 5 artifacts and 5 scrolls. I lost
3 games in a row. Once on turn 3. Once on turn 8. On my 4th game I was
FINALLY able to win on turn 73. For the last 15 turns of the game I was
getting dangerously low on spells. It was a constant struggle to shoot
down walls with my bolters in order to keep getting a fresh supply of
spells rolling in.
In the beginning of the game they were blowing my creatures away left and
right. I had no chance. So I got in my castle and hid out while they
built this ridiculously HUGE army of mega-powerful super-duper-turbocharged
powered-up creatures. I was going to DIE as soon as my castle collapsed
but then someone cast alliance on me. HA HA. So I spent a jillion turns not
really knowing what the hell I was going to do or how on earth I could win.
blah blah blah. Turn after turn went by. I had NO shooting creatures so I
couldn't "accidentally" shoot my allies. To make it worse I didn't even
have any brain drains to go kill a wizard. All I did was eventually cast
some wall spells to box in 2 of the wizards. I used my creatures to box in
a 3rd one. (I had only killed one wizard at the beginning of the game.)
To give you an idea of how powerful these guys were, they went around
mowing down all the generators, even though the dragon nests produced LOADS
of dragons for them to fight.
Then lo and behold, a wizard cast a bolter wall right into the middle of
the board and things started looking up for me! I quickly cast subversion
on it, then recover boost, then double, then simulacrum then cloak then
replicate. One of my allies was even nice enough to cast Range Boost on
one of my newly acquired Bolter Walls. hehe.
With my new army of 5 bolter walls I was ready to whoop some ass but I was
surrounded by jillions of trees, gooey blobs, dragons, undead creatures and
you name it. The board was about 90% full. So it took me FOREVER to be
able to kill an enemy wizard. Then 2 forevers to kill the next one.
I got so many bonus spells that by the end of the game my wizard was so
powerful that he could cast ANYTHING ANYWHERE he wanted. I was casting
Grizzly Bears halfway around the board. hehehe.
My score was 3031 which was 7x higher than anyone elses. But the whole
opposing team combined had well over 2000.
--------------------------------------------------------------------------
* BUG: I vanished wizard 6 and then there was an enforcer hit on his turn!
This only happened on the turn IMMEDIATELY after I cast vanish on him.
It never happened again after that. Ok, this was a problem with the game
trying to move a wizard who had been warped. I have now fixed MoveWizard()
to check the .warped bit and exit if it is set. NOW FIXED.
* MODIFIED isStupidCast to prevent casting of Speed and Fly on Bolter Walls.
* NEW FLAG: FLAG_HIGHCR for the Archery and Nonarchery spells so that
computer wizards will use them more intelligently.
* BUG: There is something wrong in the movement routine! The Exorcist can't
move! It says "Cannot attack the living" when trying to move into an empty
space! There are no other creatures nearby. Happened on turn 1.
The problem was in isInvalidAttack() NOW FIXED.
* BUG: uhmmm.. I've killed every single thing on the board and the game
isn't ending. This was caused by GetMass() not returning the correct
number. NOW FIXED.
* BUG: uhmmm.. I've killed every single thing on the board and the game
isn't ending. This was caused by LoadLevel() not setting the "Level"
variable correctly (it was some totally weird number when it should have
been 0). NOW FIXED.
BUG: Enforcer hits on score screen at end of game. I encountered this once
and then I was never able to duplicate it. So I have no idea how it
happened. ???
* PROBLEM WITH VICTORY CONDITIONS: When playing the game with the default
settings of 4 generators you sometimes win on the first turn without even
doing anything! (when the generators don't generate anything on turn 1).
So I changed it so that to win the game you must now either kill or block
all independent generators. NOW FIXED.
* PROBLEM: When I select "Save as" I like to save the game with the turn
number as part of the filename. But then I have to go back and check the
score panel, then do save as again which is annoying. So now I display
the turn on the "Save as" panel and the "About" panel too. NOW FIXED.
* When the game ends it now tells you WHY it is ending.
ENFORCER HIT: I shot and killed my own wizard with my Blue Dragon and then
when I ended my turn it caused an enforcer hit. Leaving this for SAI.
* UPLOADED v2.5d DEMO version to aminet on Sunday, June 27th, 1999.
*************************************************************************
BEGIN MUSIC UPGRADE
*************************************************************************
June 27th, 1999:
The dir Chaos_2.5/ has the FINAL 1 MEG VERSION in it.
The dir Chaos_2.6/ has the version with the new music in it.
* MUSIC is now played during spell-selection phase. I played a couple of
test games with 6 theme songs installed and it was MUCH better than 0 theme
songs like we've had in the past but it still wasn't nearly enough.
* The game feels MUCH more upbeat with the new music!!!!
* BUG: When starting a new game the colors on the HiRes part of the setup
screen are all wrong and it is positioned wrong too. FIXED.
* BUG: When starting a new game the colors on the HiRes part of the
gameboard are wrong. FIXED.
* BUG: Several of the new Sidewinder protracker mods won't work with the
playroutine. They are playing EXTREMELY slowly. I converted them to
MED MMD1 so this is NOW FIXED.
* MODIFIED the game so that if you turn off sound and speech then the music
plays continuously through the spell-selection, spell-casting and movement
phases of the game, only changing at the beginning of the next turn.
* INCLUDED CD advertisement for Sidewinder CDs into the docs.
*** Color My World Modifications ***********************
* Shortened the intro.
should be at 52: c-3 a#2 b-2
Sequences with main tune:
12,13,14,15,16, 17, 18, 19, 20, 45, 46, 47, 48, 51, 52, 71, 72, 75, 76,
11,09,09,12,10, 13, 14, 15, 16,
12 has a bleep that I might remove.
13 has breaking drumbeat I might remove. Nah leave it alone.
* BAD NOTE: 02 had a bad sounding note so I copied the block to 65 and
fixed it. block 02 is no longer used.
block 11 has extra stuff in it that interferes.
Block 11 is just like block 36 except for track 3 which is totally
different.
* I didn't like the way block 11 sounded, the notes from 2 different tracks
were colliding with each other so I copied 11 to 64 and then wiped out
track 2. Block 11 is no longer used.
* NEW BLOCK:
I was absolutely certain about all the changes I made so far but for this
next one I'm not at all sure. I made a new pattern 66 and couldn't decide
where to put it or if it should even be in the song? How do you decide the
order or your blocks? Do you use some sort of formula? Or do you just
throw them in there randomly? I've always wondered about this.
I put it near the end.
***************************************************************************
* BUG: sometimes wizards cast Plasma Beam for some strange reason.
then they always cast it up to the left, even if nothing is there, or even
if it attacks multiple creatures that they own while not hurting any
enemies. Leaving this for SAI to investigate. Fixed by JC months later on
October 20th, 1999. NOW FIXED.
* BUG in protracker play routine. There is a bug in the playroutine that
causes certain protracker mods to play back incorrectly. It sounds like
the notes are being played back about 100x too slowly. I have no idea how
to debug this so I'm just converting the affected mods to MED format.
Converted LOTS of protracker mods to MED MMD1 format.
* NEEDED: Dear SAI, could you please adjust the loading and saving such that
player 3 can save the game, and then when reloading the game it will reload
to player 3's spell selection phase? Thanks. Implemented by JC in August
1999.
I am currently under death threats from Brian Dixon and my car has been
vandalized twice so I am under duress and I must now move.
ReleaseSemaphore(&SourceCode) by JC on July 3, 1999.
ObtainSemaphore(&SourceCode) by SAI on 5 July, 1999.
* OBSOLETED: EditPopupIDCMP is now handled my the main HandleIDCMP routine.
This means that "q" querying etc. now works properly in the editor.
* Temporarily turned off the end of turn confirmation as I find it annoying.
* The menumode variable is now local to HandleIDCMP.
* Improved the implementation of the popup creature menus using an array
of functions.
* Tidied up documentation in editor.c.
* Fixed a bug in ClearBoard().
* Fixed an incorrectly line relating to the CatLord in cast.c.
* Examined the remaining occurrence of ImpID occurring in the source.
I was able to replace most of them with isIDcreature type constructs.
The following occurrences remain:
-- in the enumeration in defines.h (pretty obviously needed)
-- in io.c (1 occurrence) in probability saving block
[[ actually this code looks broken because it is only saving
spell probabilities for creatures ]]
-- in reincalc.c (1 occurrence). Since this is not compiled into the
final game, I'm happy to leave this one alone and avoid having
to include extra files.
I eliminated all occurrences from spell.c, but because of how the
loops work this file (among others) still depends on all creatures
coming before other spells!
Note from JC: it will be like that for a long time to come because I
won't have time to fix it for a very long time.
ReleaseSemaphore(&SourceCode) by SAI on 19-August-1999
ObtainSemaphore(&SourceCode) by JC on August 19th, 1999
* End Turn Confirmation is now an option in the menus. Default is OFF.
* PROBLEM: The "about" screen with the pentagrams hashes sometimes. It
hashes a lot and looks utterly terrible under heavy CPU load. NOW FIXED
by increasing the taskpri to 100 during the doublebuffer switching.
* PROBLEM: The credits scrolling is not 100% smooth and is very jerky
under heavy CPU load. NOW FIXED by increasing taskpri to 100 during
the doublebuffer switching.
***************************************************************************
* NEGATIVE SCORE BUG: I played a game against JJ and I won but my score
was negative and his was positive so he claimed he was really the winner.
In the current version of the game shooting the following scrolls gives
the following points:
Scrolls of creatures award as many points as the original life of the real
creature.
moveit -124
Pox shield -125
acid rain -123
devastation -1
touch of god -116
ball lightning -114
plasma beam -113
sword of sassenrath -118
cursed sword -110
nomount -86
Other scrolls have various (mostly HUGE) positive scores associated with
them. This is all caused by bad subscript errors. Points are awarded
according to the .Life statistic. But Magic Spells don't have a
.Life statistic so it just accesses some other data.
Simply replace all occurrences of ScoreAdd(player,InitialData[id].life)
with IF IsScroll(cellp) THEN
ScoreAdd(player,1)
ELSE
same line as before
END_IF
Made required changes to DevastationHandler() also.
DONE AND FIXED.
*****************************************************************************
* Above fix increased the filesize of cast.o just enough to start producing
Error 502: Reference to function > 32768. So I had to change the
makefile for cast.c to use code=far. NOW FIXED.
* BUG: DeathBringer struck a scroll dead. NOW FIXED.
* PROBLEM: We keep getting Emails from NTSC users who don't know how to
PALboot their Amiga. I added in the AmigaToPAL cli command which
requires OS 2.04 or higher. Now the game automatically puts the computer
into pal mode. FIXED.
* BUG: Pressing 'q' on the creatures on the alt-o menu thing shows the
spell description instead of their stats. NOW FIXED.
* PROBLEM: I was implementing Spell-List editing so I made a new file
"SpellListedmenu.dat" and I adjusted the makefile to run menumaker on it
just like edmenu.dat. But this produces 2 different files, each with their
proper menu data, but each uses the exact same same variable names!
I have worked around this by hand-editing SpellListedmenu.c so that all
variables start with "sl".
Is there a more general way that you want to work around this?
****************************************************************************
***** Spell-List Editor Upgrade *****
****************************************************************************
Since SAI has become burned out on coding and the game is suffering from a
lack of attention I have hatched an ingenious plan! }8)
I have decided to implement a Spell-List editor for Chaos this way
(hopefully) I can get SAI to design some levels for me to have fun playing.
This will allow us to maintain development momentum.
These days I have very limited time to spend working on the game and this
was the simplest coding upgrade I could think of. It took me my entire 2
days off + 1 work day to implement it. This doesn't bode well for my other
upgrade plans. 8(
Now that we have spell-list editing we can start making REAL levels for
Chaos! YAY!!! Now when I come home from work and I'm too tired to
program, maybe I'll have enough energy to do some level designing.
Implement Spell-list editing ROUGH NOTES:
* 0. Have a seperate spell-list editor which is different from the "board
editor"
* 1. Its easy. Just make a SpellBoard for storing the spell list onto.
DONE.
* 2. You select "Edit Spell List" from the Main Menu. DONE.
* 3. Figure out where the code goes when you select "Edit Spell List" ???
DONE.
* 4. delete copy and paste work exactly the same as in the board-editor.
DONE.
* 5. Modify HandleIDCMP + make new menu. DONE.
* 6. Need CopySpellsFromListToBoard(player)
(do this once at the beginning + anytime the player number is changed) DONE.
* 7. Need CopySpellsFromBoardToList(player)
(do this whenever you select "quit" or change player number) DONE.
* 8. Need alt-i for "insert" an empty space into the spell-list. DONE.
* 9. Need alt-d to delete just as in the board editor unless it is used
on an empty cell in which case the empty cell is deleted and all cells
to the right are scooted 1 space to the left. DONE.
Anytime you select a player number the SpellBoard is cleared and rebuilt
with the selected player's spell list.
then by pressing alt-o it switches to the backup board and displays all the
available spells just like in the board editor.
alt-o MUST switch from board to backupboard and then back to board!
Don't switch back to realboard!!!! Because sometimes board will be
realboard and sometimes it will be spellboard.
Choose a spell, switch back to the SpellBoard, and place it in the spell list.
Only the first 150 positions are used. You should normally only use the
first 99.
Upon exiting the first 150 positions on the SpellBoard are copied into the
real spell list of the player.
When you place a spell it goes "on top of" the one that is already there.
Thus you can immediately delete a just-placed spell and the old spell will
be there. A miniature undo feature.
August 26th, 1999
Ok, now the Spell-List editor works great but... I still haven't
worked out how to fix the gamesave format to save on a particular person's
turn! 8( I shouldn't start designing any levels till I figure that out
and modify the gamesave format accordingly.
******************************************************************************
***** END of Spell-List Editor Upgrade *****
******************************************************************************
******************************************************************************
***** Gamesave Format Upgrade *****
******************************************************************************
* currentPlayer is now saved.
* BUG: ExorcistID is listed in the translation table twice! FIXED.
* BUG: Probability information was not completely saved. FIXED.
* BUG: the currentSpell was being saved but not translated. FIXED.
* BUG: When you save the game it resets back to player 1's turn. FIXED.
* BUG: When you load a game it resets back to player 1's turn. FIXED.
* REMOVED old stuff that is no longer needed.
August 31st, 1999
OK, now gamesaving works perfectly! You can save on anyone's turn and
upon reloading it reloads back to that player's turn.
* BUG: The FavoriteFoodID and RunsAwayFromID is not translated like all the
other ids. So the first time we add a new spell to the game, all our
previously designed levels will have creatures with messed up tastes and
fears. NOW FIXED.
* ADDED: Lots of extra BYTES, WORDS and ULONGS to the header block for
future expansion. This way I hopefully won't need to convert levels from
old format -> new format everytime I add a new option to the game.
* ADDED: Lots of extra BYTES, WORDS and ULONGS to the cell structure for
future expansion.
* ADDED: Lots of extra BYTES, WORDS and ULONGS to the char_stat structure
for future expansion.
* HOPEFULLY I can now do a complete major upgrade or 2 or 3 and not have to
convert all the old levels up to the new format.
******************************************************************************
***** END of Gamesave Format Upgrade *****
******************************************************************************
******************************************************************************
***** Line of Sight Upgrade *****
******************************************************************************
* BUG: If you are trying to cast a roper or bolter wall etc. along a 45°
angle, the "l" key will show that you have line of sight but sometimes the
"c" key says you don't! And when the "c" says you can't cast it there you
really can't cast it there even though it is in range and you have line of
sight! This is caused by a problem in isLineOfSight. isLineOfSight
_SHOULD_ work perfectly but it doesn't. I don't know why. Its like it is
off by 1 or something. This problem only occurs when there are generators
adjacent to the 45° path. If you want to investigate this mystery then
please do so. In the meantime I have solved the problem by replacing all
occurrences of isLineOfSight C code with isLineOfSightQ asm code. NOW FIXED.
* SPEEDUP: Computer controlled shooters now decide who they will shoot over
2x as fast as before!
* SPEEDUP: Computer AI is now MUCH faster than before!
* SPEEDUP: "c" key is now over 3x as fast as before!
* SPEEDUP: "s" key is now much faster!
* BUG: isLineOfSightQ does not automatically return TRUE when the source
cell is the destination cell. (This prevented me from casting Combat on
myself) NOW FIXED.
******************************************************************************
***** END Line of Sight Upgrade *****
******************************************************************************
* FIXED various bugs with the Mass Ressurrect spell + pox or reincarnation
or vanquished foes. It was all very broken. NOW FIXED.
*************************************************************************
** Remove Owner from the animation byte and transfer it to its own byte**
*************************************************************************
Methodically go through and replace all >> 3 occurences with a
GetPlayer() call. Replace all occurrences of << 3 with a
ChangeOwner(cell) subroutine that does everything needed to change the
owner of a cell to another person.
* All occurrences of PLAYER_MASK, << 3 and >> 3 have been REMOVED from all
spell files.
* All occurrences of >> 3 have been REMOVED from chaos.c, info.c, move.c
and predicate.c
* All but 1 occurrence of >> 3 REMOVED from core.c (it refers to oldflag).
* All but 1 occurrence of >> 3 REMOVED from editor.c (it refers to buffercell).
* All occurrences of << 3 have been REMOVED from chaos.c and init.c
* Did not replace any occurrences of << 3 in core.c as all the uses seemed
to be very lowlevel.
* Backed up the Chaos_2.61 dir to Chaos_2.62. Work will proceed in
Chaos_2.62 dir.
* Redid the cell structure so that there are .owner and .oldowner bytes
* All remaining occurrences of << 3 and >> 3 REMOVED!
* Anywhere there is a reference to .oldflag will be added a reference to
.oldowner. DONE.
* Check all references of .flag and if refering to player number then replace
them with .owner. DONE.
* Went back and looked at EVERY usage of .flag, ->flag, .oldflag and
->oldflag and looked for anything susupicious and fixed it.
* Eliminated 40 occurrences of code like "& PLAYER_MASK >> 3" and
"|= Player << 3" Thus saving at least 360 bytes of code.
* WizardInfo structure now has a .owner byte also. Modified BackupWizard()
and RestoreCellWizard() and io.c appropriately.
* ALL files 100% cleaned up!
* Played a test game. Saved and Loaded multiple times. Everything works.
* Sending to SAI on September 9, 1999.
*****************************************************************************
** END Remove Owner from the animation byte and transfer it to its own byte**
*****************************************************************************
* NEW FUNCTION: CenterWriteText
* REGISTERED USER on September 17th: a nice chap from Ireland mailed in his
registration fee. He has an AGA Amiga 1200 tower with Zorro IV Busboard,
Picasso IV gfx card, 50 Mhz 060, 64 Megs of RAM, Power Flyer, etc.
* Added Sidewinder to the Scrolling Credits.
* Played Sean's Levels 1-4 and 10. Added turns_left to the about screen.
* Added Registered_Text to hold the registered user's name.
******************************************************************************
***** Exploration Mode Upgrade *****
******************************************************************************
I was originally not going to implement exploration mode until the graphics
upgrade programming was done. But since I have extremely limited time
these days I've re-ordered my priorities to do this upgrade first since it
seems nice and easy and provides the MAXIMUM improvement in gameplay.
When exploration mode is on you cannot see cells which you have not
explored. Once you have explored a cell it stays permanently explored,
there is no need to maintain line-of-sight to the cell. This makes the
gameplay nice and simple, the way I like it.
Most creatures simply explore the cell they are in and all adjacent cells.
Some creatures, like Eagles explore further and can see behind walls due to
flying high in the air.
Other creatures, like snakes, can "feel" the movements of other creatures at
far distances, thus allowing them to map cells which are hidden behind
walls that cannot be seen by normal creatures.
Certain other creatures can hear or smell other creatures.
This adds the "Explore-the-Map" play mechanic to the game. You can't see
any cells until you have sent a unit to map them. Once mapped the cell
remains visible forever even if you have no nearby units or no
line-of-sight.
You can also see the cells that your allies can see. But if they stop
being your ally then you can no longer see those cells.
I love games where you must explore the level and map it out.
Having Exploration Mode turned ON makes the game MUCH harder since you
have no idea what direction you should be going in the early stages of the
game. Nor do you have any idea what direction you will be attacked from
at first.
Exploration mode makes computer movement more CPU-intensive which is
why I waited so long to implement it. Now that the game is aimed at a 2
meg 020+ amiga it shouldn't be a problem.
Exploration mode doubles the amount of fun generated by the game IMHO.
I was going to wait and implement Exploration after I did the graphics
upgrade but due to my extremely limited time I had to reprioritize things
and am now implementing the simplest upgrades first.
Rough Notes:
I added ExploreCell(cell) line of code to the following routines:
RestoreCell
RestoreCellWizard
InsertCreature
WarpIn
Growth
the teleport spell
MoveTempest
MoveVortex
CrMove1
cMoveEngaged
cMoveNonEngaged
CalculateArtifactOwners
WakeUp (used by Subversion, Betrayal and Wake)
* REWROTE Charm, Raise Dead, Mass Ressurrect and Swap spells to use
ChangeOwner()/changeOwner() or InsertCreature
Hopefully that is all the places that needed it. Can you think of any
routines that magically cause a creature to appear somewhere that don't
use the above routines? If so they probably need ExploreCell(); added
somewhere.
* 0. Modify io.c to handle loading/saving all the new stats. ALREADY DONE.
* 1. Convert spellman.tex into a real JC file since I will be editing sm.c.
DONE.
* 2. You MUST have a real cellnumber for the ExploreCell() routine!!!!
Because you hafta do sqDistance from the cell numbers! DONE.
* 3. Write the real exploration routine. DONE.
MUST TAKE INTO ACCOUNT CanBeSeen or CantBeSeen!!!!! DONE.
Change CanBeSeen into CantBeSeen etc. DONE.
Take into account sleeping, dead, scrolls and nobody artifacts. DONE.
* 4. Adjust AutoMouse Routine. DONE.
* 5. Adjust information panels. DONE.
* 6. Adjust ReDrawCell. DONE.
* 7. Adjust animator task. DONE.
* 8. Make ChangePlayerView Routine. DONE.
* 9. Modify sm.c to handle all the new stats. DONE.
*10. Add the stats into the spell files. (Only nonstandard creatures need the
stats added in. Others use the built-in defaults.) DONE.
I made all snakes feel out 6 squares.
Snakes cannot be felt, smelled or heard. Only seen.
All living flying creatures don't need LOS to see. And most see out 2
squares.
Eagle, Falcon and Vulture have Excellent eyesight.
Spectator, Achiyalabopa and Harpy have poor eyesight.
Vulture, Dire Wolf and Arctic Wolf have excellent sense of smell.
I couldn't really decide what to do about other creature's senses.
I keep saying eyesight but maybe I should really change it to
"cartography"?
Still need to consider flying undeads.
Still need to consider some ground creatures which can see out 2 squares
and requireLOS.
Perhaps archers and ogre mages could have excellent eyesight?
Useful table of sqRanges:
1 = just the 4 adjacent cells.
2 = all 8 adjacent cells. (out 1 diagonally)
4 = (2 horizontally)
8 = all 16 adjacent cells. (out 2 diagonally, 2 horizontally)
9 = (3 horizontally)
18= out 3 diagonally (4 horizontally)
32= out 4 diagonally (5 horizontally)
36= (6 horizontally)
50= out 5 diagonally (7 horizontally)
72= out 6 diagonally (8 horizontally)
98= out 7 diagonally (9 horizontally)
**** OOPS! Now I remember why I was supposed to wait until the graphics
upgrade was complete before I implemented all this stuff! All those cloak
images drawn on the board for player 1's view are blocking LOS for
everybody! If I had done the graphics upgrade first this would not be any
problem at all. Drat. ****
*11 solve the problem of all those cloaked cells blocking los for the
computer players while player 1 is watching the action!
A. Calculate AutoFailArray. Easy. If it isn't explored then its
autofail else its not. DONE.
B. When you explore a cell you 0 out that element of AutoFailArray +
you recalc the AutoAcceptArray for that cell. DONE.
C. Modify JC LOS routine to take into account AutoFail. DONE.
D. Make the AutoFail() function just like AutoAccept() Function. DONE.
E. Make the AutoFailArray[] just like AutoAcceptArray. DONE.
F. Make the CalculateAutoAcceptAndFail FUNCTION. DONE.
G. Modify asm code to use AutoFailArray. DONE.
H. OOPS. Above mods didn't work due to lack of registers so I'm
ELMINATING the AutoFailArray[] and using AutoAcceptArray[x] == -1
to mean that it is an AutoFail cell. This saves a register in the asm
code and it also saves 1 instruction in the main loop.
This new way is super efficient. DONE.
Normally I would simply have the "board" displayed to the screen using
cloaked cells for unexplored cells. And all LOS calculations take place on
the shadow board which has the shadow masks of every cell there all the
time no matter what. + unexplored == autofail. Everything would work
perfectly and effortlessly and quickly.
Ok but i don't have the shadowboard yet because I haven't done the gfx
upgrade yet so I will just hack in a secret rastport which has the images
of everything for los calculations.
So redrawcell and animator will simply draw 2 images, one to the display
based on playerview, and 1 to the shadowboard which is the real image.
LATER ON it will draw 2 "images" but the 6 bitplane images only go to the
screen and the shadowboard only gets a 1 bitplane image. (The ShadowMask
which will all be done automatically by my asm cellrendering routines which
I coded like 2 years ago!
Damn this whole double rastport method will be slow and lame and waste
TONS of chipmem!!!
I need to do the gfx upgrade so I can do the REAL shadowboard!!!!
This hacked-in method is messing up the sound effects! (Really this is a
problem with the sound effects system being dependent on cpu speed.)
I. Create ShadowBoardMem, ShadowBoardBitMap and ShadowBoardRastPort
along with initialization and cleanup code. DONE.
September 21st, 1999. My evil mom broke my $550.00 Commodore 1950
Multisync monitor! ARRGGHHH!!! I had to switch back to my $50.00
Commodore 1084S. ack. Now I hafta use 640x256 resolution! I'm back in
the stone ages! I'm going to die of lameness!
J. Modify ReDrawCell and Animator Task. DONE.
K. Modify LOS routine to use the ShadowBoardRastPort when
ExplorationMode == YES
This requires creating a new LOSBitPlane variable which normally
will = LoResBitPlane but when ExporlationMode==YES
LOSBitPlane will = the first byte of the first bitplane of the ShadowBoard.
Setup and Asm Code properly modified. DONE.
* TESTED OK September 22, 1999: Ok at this point I have never actually
tested any of the above modifications A-K. So I just set PlayerView==1
and ran the game to test out the above changes. EVERYTHING WORKS PERFECTLY!
Its totally amazing! Geez I must be a 40th level megacoder! I can explore
the map and I can't see the enemies, its totally kewl!
Well my Vulture (which can see 3 cells) and my Pegasus (which can see 2
cells) are totally mapping out the board super fast. This has convinced me
to reduce the sightranges of all flying creatures.
Vulture and Eagle will see out 2 squares diagonally. All other flying
creatures will be set to see only 1 square out just like the ground
creatures (except flying creatures don't need LOS so if their sightrange
ever gets increased they'll be able to see over walls and things.) DONE.
* 12. Replace all occurrences of HighLightCell= with a call to the new
HighLight() function which will check that the cell is visible to
the current PlayerView before highlighting it.
HighlightCell=-1 becomes HighLight(-1); etc. ALL DONE.
* 13. Entering the board editor or spell editor should set ExplorationMode=NO
and upon exiting it should be returned to its former status. DONE.
* 14. Changing spell-selection phase, spell-casting phase or movement
phase to a human player should do a ChangePlayerView(); DONE.
* 15. Cell effects which only affect 1 cell need to be modified so that if
the cell is not visible to the current PlayerView then they are not
drawn. I don't know if they should still make the sound or not???
I simply made CellEffect() do nothing (no gfx or sound) if it is
taking place in an unexplored cell for now since that was the easiest
way to do it. DONE.
* 16. Make MaskWritePixel(); function for use by the graphical effects in
ExplorationMode. DONE.
* 17. ThreeBeam has a flaw in that it sometimes writes pixels to negative
coordinates. The OS clips these and doesn't display them but still it
shouldn't be trying to write pixels to -1,-2 coords. NOW FIXED.
* 18. ThreeBeam needs to be modified so that the pixels which would have
been plotted in unexplored areas are not. Only pixels which plot into
explored areas really get drawn. Replace all WritePixel() calls with
MaskWritePixel() which will return 1 if it wrote the pixel and 0 if it
wrote nothing. Add up the return values and if >0 then do the AUDIONote
else don't. DONE.... Later on... I have now decided that I like
hearing the sounds of what is going on in unexplored regions so I no
longer mask the sound on this effect. DONE.
* 19. Modify PlotBreath(), PlotBolt() and BirdShot() as above. DONE.
* 20. Modify BoardEffect() to not do the effect on unexplored cells. DONE.
* 21. Modify Cycle() / Bow weapon. This automatically fixes
WeaponEffect() and WeaponEffectDrawer(). I intentionally
left the sound effects in place and only hide the graphics. DONE.
* 22. Lightning() will be left as it is because there is no easy way to mask
it. If you cast it you reveal your position. DONE.
* 23. WizardExplode() will not be masked simply because I like to know when
an enemy wizard has died, even if he dies in the vast expanse of the
unexplored regions. DONE.
* 24. New function: CompletelyRecalculateTeamExplore(); This function must
be called any time the teams change for any reason. DONE.
* 25. Alliance, Separation and core.c "death of wizard" code modified to
use CompletelyRecalculateTeamExplore(); Tested and works great! DONE.
* 26. Exiting the spell editor or board editor doesn't redraw the board right
because REDRAWALL doesn't redraw all those empty explored spaces!
So I changed ReDrawAll to redraw everything (even empty spaces)
IF ExplorationMode==YES. DONE.
* 27. At beginning of game set playerview to 15 since that will show a solid
grey board. DONE.
* 28. September 29, 1999: The next problem requires a change to the gamesave
format so I am starting a new version now. Begin Version 2.6.3.
* 29. MAJOR PROBLEM WITH REPULSION: The Replusion spell copies cells around
using board[x]=board[y] style code. But this copies the exploration
bits to so it ends up exploring areas that you've never been too and it
looks buggy.
Also the clone, hyperclone and warp spells use board[x]=board[y] code
which means they are copying around the exploration bits of players that
they are not supposed to!
Also the movement routines and other places use board[x]=board[y] style
of coding producing imperfect results for ExplorationMode.
POSSIBLE SOLUTIONS:
A. Make a new "CopyCell" routine which copies everything EXCEPT the
exploration info.
B. Take the exploration bits out of the cell structure and make them
their own array.
I have opted for Option B because it is the easiest and most logical
way to code it.
There is now an Exploration[] array and an ExplorationTeam[] array.
I have removed them from the cell structure and modified the macros and
exploration code appropriately.
This neccessitates a new block of code for the gamesave/load routines.
ALL DONE.
* 30. FLAW: I was playing a test game in ExplorationMode and I started out
with Triple, Red Dragon, Replicate, Cloak. So I had 6 red
dragons, 3 of which were cloaked so I was trying to explore the map as
fast as possible so I was flying each dragon deep into unexplored territory.
I clicked on my cloaked dragon and moved him deep into an unexplored
area and the game made a funny noise and my dragon was gone! At
first I didn't know what the hell had happened. Then I realized
that I had flown him into a pit. Poor little dragon 8(
NOW FIXED with informative text message.
* 31. A computer player cast Vengeance on wizard 1 while it was on wizard 2's
view and it showed the spunge effect on the unexplored cell! Wrong.
Its not supposed to do that! Modified SpungeColour() to use
MaskWritePixel() NOW FIXED DONE
* 32. The Following spells need to be investigated/modified to call
ExploreCell() in an appropriate manner: Repulsion, Replicate,
Simulacrum, HyperClone, Teleport, The time when any creature warps back
in to the board, Turmoil, Vortex, Tempest, Roper teleportation,
GrowthRoutine, Horror, Passsage. ALL DONE.
Please keep in mind that from this point on if you copy cells around you
must have a corresponding ExploreCell() call. Furthermore if the
original cell is being erased then the ExploreCell() call must happen AFTER
the original cell is erased (for line-of-sight reasons).
Question: Should inanimate objects and growths explore cells just as well
as living creatures? I am thinking that maybe we should set their
sqSightDistance down to 0 so they will only explore the cell that they are in
and no further. What do you think I should do? On the other hand leaving
things as they are means that casting Meteor Storm is actually usefull now
and it also can prompt human players to cast walls and trees around wildly
in an attempt to spot generators or dragons. So I think I'll leave things
as they are.
At this point (September 30th, 1999) I have already played numerous test
games and everything has apparently worked ok but there is one fundamental
thing still to be done in order for creatures which have long-range sensory
perceptions which require Line-Of-Sight. (I don't think there are currently
any such creatures, but there will be one day.. or such creatures will be
manufactured through the use of magic spells). This brings us to #33.
* 33. BUG: Any creature with e.g. sqSightRange of 32 and SightRequiresLOS==YES
can't actually see that far because the close-up unexplored cells
block LOS to the further away unexplored cells therefore:
ExploreCell() must be modified to sort all the cells on the board
into ascending order of distance from the observer. Then this sorted
list of cells will be used instead of just going through the cells
from 0 to 239. NOW FIXED AND DONE.
PLAYED a test game with the sound off. I controlled 2 wizards against 4
generators with Texas Trash'em OFF and no artifacts or scrolls.
ExplorationMode=ON. Boy the game sure is harder when ExplorationMode is on
and Texas Trash'em is off! I LOST THE GAME ON TURN 26. I had been
fighting for my life in a hopeless battle for several turns. I'm glad they
finally put me out of my misery.
One interesting thing is that I cast my Meteor Storm on turn 3 and it
helped me map out the level quite nicely.
If I had played the game where both my wizards were in an alliance then I
think I could have won the game but I never had LOS for Wizard #2's
RangeBoost to be cast on Wizard #1's Elf. That one problem ruined
everything for me. If they had been in an alliance they would have had LOS
to cast powerups on each other. My score was 219+82.
* 34. Speed up the "derive Cell from pixel coords" code in MaskWritePixel by
using my LSRCellHeightShiftBitMultGAMECOL[y] technique from cell.c. DONE
* 35. NEW MACRO CellFromPixel(x,y) using maximum speed technique. DONE.
* 36. ChangeExplorationMode() routine. DONE.
* 37. Modify all Numeric keypresses to check that the cell is really visible
to the current PlayerView before highlighting it.
PROBLEM: when you press the "c" key over a spell which "works over the
entire world and does not require line of sight" on the first turn of the
game, you can sort of cheat and see the positions of enemy wizards.
This applies to Armour, Cursed Sword, Dark Power, Vengeance, etc.
What should we do about this?
A. Leave it as is. (and this will explain why computer players use such
spells on creatures they can't "see")
B. Change the "c" key to only highlight explored cells, even though the
cast is legal.
C. Simply add a new CAST_NOTONUNEXPLORED or CAST_EXPLOREDONLY bit to certain
spells such as Vengeance, Dark Power, Justice, Armour, Cursed Sword, etc.
Probably every spell which doesn't need Line-of-Sight would need
CAST_NOTONUNEXPLORED. Also add "Cannot cast on unexplored cell" to the
2nd info panel of the spell information thing.
I have chosen option C and have modifed EVERY SPELL which does not need LOS
except for the following exceptions:
I Intentionally did not add CAST_NOTONUNEXPLORED to the Bury, Magic Glass,
Iridium, MassMorph, Mutate, NoGrow, Pit, TheExorcist, Singular Earthbind,
Spectator, Teleport, Thundermare, Vodka and Weak Wall. If there are any
complaints about this then I can add it in to these spells too. I'm not
too sure about all this. Only time will tell.
Should I also add CAST_UNEXPLOREDONLY for the proposed mapping spell
that lets you map out a bunch of cells?
* PROBLEM: Pressing the 'l' key on a blank cell only highlights that cell
and the 8 adjacent cells because the owner of that cell (NOBODY) has not
explored any cells. I put some special code in AutoFail() so now the 'l'
key works like it always did. NOW FIXED.
* BUG: Moving a creature into an unexplored cell causes him to not be
highlighted anymore, even though he still gets to shoot. The problem is
that the destinationcell is being highlighted before it has been explored,
thus the highlighting is not shown. NOW FIXED.
* 38. Added CAST_NOTONUNEXPLORED to the spellinfo screen. DONE.
* 39. Added SightRange, FeelRange, SmellRange and HearRange to creature
info panel 2nd screen. DONE.
* 40. Changed the Ghost and Drelb so they can't be felt or smelled. DONE.
* 4 NEW SPELLS: Cartography, Alternography, Seismology, Telescope.
Alternography majorly kicks ass!
* After adding the new spells I loaded up the old levels to see if they
still worked and ... THEY DO! 8)
* BUG: Highlight() routine is highlighting the computer wizard's creatures
even though they are in areas which are unexplored by me. NOW FIXED.
******************************************************************************
***** END Exploration Mode Upgrade *****
******************************************************************************
Before I implemented the ExplorationMode upgrade, I had worked out the full
details of the "Play By Email" upgrade and it was going to be easy for me
to implement it. But the ExplorationMode makes "Play By Email"
implementation far more complicated.... i.e. I no longer know how to do it.
* CANCELLED: The Play by Email upgrade has been CANCELLED until someone
registers the game who has a netconnected Amiga.
* New routine DepthWriteText to replace FancyWriteText which only has the
outline thing down and to the right 1-4 pixels. Much faster + looks
better. DONE.
October 3, 1999: My mom poisoned me with insecticides and hair spray so
I'm extremely ill. So I can't work :( Symptoms of my illness include, my
entire body aches, I have no strength to stand up, any input of food or
water causes a violent output reaction. Fever 101.5. I can't lay down or
I throw up. I can't move or I throw up from extreme nausea, its like
having super severe motion sickness. I must sit perfectly still. Diarhea,
stomach ache, etc.
So I will just playtest another level.
Playtest SAI LEVEL 7.
Level 7: The game says I won on turn 14 even though my wizard was about 2
turns away from the exit. I would have won 1 turn sooner I think but there
is a bug in the game where if you move a creature next to an undead and get
engaged and try to attack it then the game gets stuck and you can't cancel
the creature's move without clicking the "end turn" gadget. Sometimes "end
turn" cancels just that 1 creature's move. But this time it ended my turn
and I didn't get to move my other creatures!!!
I have now tried to duplicate this bug by playing various test games and
the bug is not reoccurring. My unicorn was adjacent to some inanimate
objects when the bug happened and maybe this is somehow affecting things.
This is an example of a time when I should have saved the game every turn
so I could replay that turn and see what is happening.
Ok I reloaded the level and replayed it and uhmm... the bug is gone. I
can't make it happen again. It must be some very technical thing that
happens. 8( UNSOLVED MYSTERY.
* BUG: When loading a game, probabilities are all messed up on the info screen!
Just save every translated spell id, then every probabilty.
ID,prob
ID,prob
etc...
Ok I made the changes but it still doesn't work!
Ok I tried a different method and it still doesn't work!
4th attempt: Ok I got it working now. It was a problem with the
translation. I will really be glad when the game is a proper database so
we can get rid of all this lame translation crap!
Total time wasted 2.5 hours. NOW FIXED.
* UPGRADED All SAI's Levels to the new format successfully.
* YUCK! Some color combos in the credits intro are terrible. I have
made a better color combo for the bright red text. DONE.
* FLAW: When a Bolter Wall is the last computer controlled thing to move it
stays highlighted well into the next phase of the game. Way longer than it
is supposed to. NOW FIXED.
* I tried to duplicate the "Kill your own wizard and get an enforcer hit"
bug but every time I kill my own wizard there is no enforcer hit. ???
* DOUBLED the speed of ClearBoard();
* PROBLEM: It takes me forever to find the spell I want when I'm designing
levels and testing things. SOLUTION: Alphabetized the list of objects in
the alt-o object chooser menu. DONE. SOLVED.
There should be a menu option like "Pick Object" or something so we don't
have to press "alt-o" all the time. Leaving this for SAI.
* DARK WOOD INCONGRUENCY: The description says they are undead but their
undead_stat is not set. NOW FIXED.
* AAUUGH! I cast animate on an independent generator and nothing happened!
I have now changed the spell description to say "This spell has no effect
on generators." FIXED.
****************************************************************************
******* My First Level Playtest Notes *******
****************************************************************************
1st attempt: I was dead on turn 9. All 6 generators generated on turn 1.
I had no chance.
Independents had score 87, life 358. I had life 0, score 9.
Jerry's First Attempt: He died on Turn 10.
Independents had score 93, life 295. He had life 0, score 8.
Attempt 2: I died on turn 11. Independent life 261, score 78.
My life 0, score 45.
Attempt 3: DAMMIT I WAS GOING TO WIN AND THIS STUPID MudMan thing with 0
maneuverability just moved next to my wizard and killed him even though he
should have been engaged to my zombie!!!!! Engagement routine needs to be
investigated!
Reloaded the savegame from a few turns back but this time the generators
were meaner to me and I died on turn 18.
* ENGAGEMENT ROUTINE FIXED: The routine now works like this:
If you are next to 1 enemy creature THEN
If you have 0 maneuverability you are ENGAGED.
If you have 15 maneuverability you are NOT ENGAGED.
If you have 1 maneuverability you have 1 chance in 15 of not being engaged.
If you have 2 maneuverability you have 2 chances in 15 of not being engaged.
The engagement system is now totally logical and easy to understand.
Attempt 4: Won on turn 41. My life: 147 Score 1161
Independent life 0 score 64. I was only able to win because I killed a
generator and then got a Dragon Nest as my bonus spell. But I suppose that
just makes up for my lousy luck during the rest of the game. If you can
survive till turn 30-something you start getting really good spells that
allow you to become an effective offensive fighting force.
** Found the Secret Scroll **
Attempt 5: Won the game on turn 11.
Level 2: I won on turn 25. Wasn't really very hard.
Level 3: I died on turn 5! A Basalt Golem charged up at me from unexplored
space and whacked my already weakened wizard and killed him! I had NO idea
he was out there!
Level 3: Attempt 2: I died on turn 16!
****************************************************************************
******* END My First Level Playtest Notes *******
****************************************************************************
* PROBLEM: You can't install Chaos to your HD by simply dragging the drawer
icon to the HD because the req.library must also be copied to the LIBS:
I have now changed it so that it will open the library from LIBS: or from
the libs/ dir in the chaos dir so now the game is SUPER EASY TO INSTALL!!!
NOW FIXED.
Ok I am now going to implement 2 new spells. One will make an inanimate
object become a creature and the other will make a creature become an
inanimate object. So what do I call these 2 spells?
Inanimorphobiosis or "Stone to Flesh" or "Animate"?
The trouble with calling it "Stone to Flesh" is that it doesn't turn
"stone" to "flesh" it turns any inanimate object (such as trees) into a
creature. However this would make the spellname be the converse of the
"Flesh to Stone" spell.
The trouble with calling it "Animate" is that it doesn't animate the
graphic of the recipient. It will still be a static image. OOPS there is
already an "Animate" spell.
Petrify or "Flesh to Stone" or Deanimate?
OK, for now I will have Stone to Flesh, Inanimorphobiosis and Flesh to
Stone. Inanimorphobiosis will be a stronger/rarer version of Stone to Flesh.
Mass Petrification will be a stronger/rarer version of Flesh to Stone.
* 4 NEW SPELLS: Stone to Flesh, Inanimorphobiosis, Flesh to Stone, Mass
Petrification.
Stone to Flesh and Inanimorphobiosis are extremely powerful. I need to either:
A) Reduce its probability.
B) Make it a bonus spell.
C) Make it have a CAST_NOGENERATORS
D) Make it so that it doesn't change owners.
I'm going with option D for Stone to flesh and option B for
Inanimorphobiosis.
* I went back and modified most of my spells to use implode cell effect for
when something bad is happening to the recipient and implode+explode cell
effect for when something good is happening to the recipient. DONE.
* SOUND EFFECTS fully reinstated in ExplorationMode. I have decided that I
like to hear all the sound effects of events that happen in unexplored
areas so I modified CellEffect() to only mask the gfx in unexplored areas
NOT the sound effects. DONE.
* BUG: Intro credits monster list sometimes has messed up colors.
This was a problem where I had MSGRandom()%4 instead of the proper
(MSGRandom()%3)+1 NOW FIXED.
* SPEEDED up the intro credits a bit.
* SMALL BUG IN JCformat: Whenever a program line uses a \" after a " there
is sometimes a messup in the alignment and/or a bogus error gets reported.
No data is lost but it just isn't aligned right. This could be seen in
sm.c which has a lot of \" constructs. I had to add an additional test to
2 routines. This is all NOW FIXED.
* ELIMINATED 2 hardcoded references to Wizard8ID and replaced them with
IsCreature() test.
* VODKA changed to allow you to cast it on the independents. Now the spell
is actually useful for something :)
* CAST_ARTIFACT added to spell information screen.
* BUG: Enemy Computer wizard cast Stone to Flesh on my wall for me. I have
now added FLAG_OWN to the spellflags so that computer wizards will only cast
this spell on their own creatures. NOW FIXED.
* CHANGED SWAP: to not swap inanimate objects.
* BEGIN v2.80
*****************************************************************************
***** ATTACHED SCREENS UPGRADE (OS 3.0 Required) *****
*****************************************************************************
COMPLAINTS:
We have received complaints from AES and others about the game using 2
seperate screens because they typically run lots of programs and flip
between them a lot so sometimes the screens get out-of-order.
I have now (finally) dug up the information on attached
(parent/child/family) screens and OS 3.0 is REALLY AWESOME!!
OS 3.0 screen handling is vastly superior to OS 2.04!
SOLUTION: Set up the main lores screen as the parent screen and attach
the hires screen to it as a child screen. This method will be used on OS
3.0 systems and the original code will be used on OS 2.04 and lower
systems so the game will still run on all versions of the OS.
I've been wanting to have LOTS of screens open at once even though I'd only
be using 2 of them at a time. But I haven't ever implemented that because
under OS 2.04 that would just be TOOO annoying to have to press amiga-m/n 5
times to switch out of Chaos.
The use of attached screens also allows me to have as many screens open as
I want without annoying anyone. All unused screens will be hidden. This
is going to be really kewl.
* IF (OS >= 3.0) THEN OpenAttachedScreens ELSE OpenUnattachedScreens. DONE.
* Modify MoveScreen() to transparently handle the old and new systems. DONE.
Ok I just tried it out and this is really AWESOME! The screens now appear
as one. If you drag one screen you drag them both so they can't get out of
place! And you can't depth-arrange them wrongly either! This is exactly
how I always wanted it to be! This is a great reason to upgrade to OS 3.0+!
*****************************************************************************
***** END ATTACHED SCREENS UPGRADE (OS 3.0 Required) *****
*****************************************************************************
*****************************************************************************
***** WHY CHAOS DOESN'T WORK ON A GRAPHICS CARD *****
*****************************************************************************
The cell highlighting when you press a numeric key uses direct memory
writes. Cyberygraphics and Picasso96 do not support this.
The animated sprite used to highlight the currently active creature uses OS
routines with no direct manipulation. Does this work on your gfx card?
Gfx cards are lame and have 0 or 1 sprites. The fancy gfx cards which have
1 sprite are already using the sprite for the mousepointer so it can't be
used to highlight a creature.
The wavy screen effect used for various spells, (most notably vodka), uses
the copper. Gfx cards are lame and don't have a copper so this just isn't
going to work on a gfx card.
The game uses 2 screens (each in a different resolution and color depth)
onscreen at once. I do not think that cybergraphx supports this. Does
Picasso 96?
The game uses color cycling. Most gfx cards are lame and don't support
color cycling.
I would love to make a gfx card compatible version of Chaos which would run
in 24 bit color with superawesome graphics in 640x480 or higher resolution
but since I don't _own_ a gfx card and neither does my programming partner
SAI, it just isn't going to happen until someone buys me a graphics card.
*****************************************************************************
***** END WHY CHAOS DOESN'T WORK ON A GRAPHICS CARD *****
*****************************************************************************
* AGA DETECTION code added. Now we can display different graphics
depending on if the game is running on AGA or ECS.
Just use IF (AGA) THEN display aga gfx
or IF (ECS) THEN display ecs gfx
* SCREWEY QUIT BUG: Ok, regarding the quit bug that sometimes causes
enforcer hits when we quit the game. I have tracked it down to the
following line of code very near the end:
IF (HiResWindow) CloseWindow(HiResWindow);
I tried adding a HandleIDCMP(DUMP_QUEUE) before that line but it made no
difference.
Now I have copied the CloseWindowSafely() function from the OS 3.0
Includes and Autodocs so the problem is allegedly now fixed.
Nope, I played a test game and I still get the exact same enforcer hits.
* 64 bit alignment of screen memory implemented. This allows the entire
computer to run faster when playing the game on AGA Amigas because the
display will be running at 4x bandwidth.
* DEFAULTS CHANGED to start with 1 human vs 1 computer wizard + 4 generators.
* SCREWEY QUIT BUG FINALLY SOLVED!!!!
Ok, the bug was caused by the fact that when the
CloseWindow(HiResWindow); was executed, at that moment the
HiResRastPort->Layer was == 0;
This could only happen when you played a game then quit it or won and
went back to the main screen then quit the game; which explains why it
never seemed to happen unless you played a "real game".
I had examined this possibility before but there were ONLY 2 lines of
code that changed the value of HiResRastPort->Layer.
1 line disabled the layers and 1 line reenabled them so I thought it was
working 100%. Unfortunately due to the spaghetti code nature these 2
lines were not being executed in pairs.
BTW: sometimes this bug would not cause enforcer hits but would instead
randomly trash a few memory locations. This happened to me dozens of times
when qutting the game would trash a few bytes of my source code in Cygnus
Ed Professional!!
This bug took me 20 hours to fix. :(
ALL FIXED NOW!
* BUG: Vodka has no effect on Independents. NOW FIXED.
* BUG: Agents cast harmful spells against their friends and allies.
Allegedly NOW FIXED.
* BUG: COMPUTER WIZARDS ALWAYS CAST PLASMABEAM STUPIDLY:
NOW FIXED.
* I also modified the PlasmaBeamHandler and stupidity checking to be
compatible with AgentCasting. DONE.
* WROTE a new PlasmaBeamRanking() routine so the computer wizards will try
to cast it under the most favorable circumstances.
* FLAW: PlasmaBeamHandler always converts illegal coordinates into a cell
with GetCell(). NOW FIXED.
* NEW ROUTINES for Plasma Beam AI:
PlasmaBeamStupidity() to check for a stupid PlasmaBeam cast.
PlasmaBeamRanking() to calculate the score for IntelligentComputerSpellSelect()
PlasmaBeamDecideWhichDirection() to calculate the best cell to cast
Plasma Beam on.
PlasmaBeamEvaluate() Low level code used by the Ranking and
DecideWhichDirection routines.
* uhmmm there were major problems in the spellcasting AI...
IsStupidCast() was assuming that the spell was being cast from the
WIZARD's cell thus it couldn't possibly have worked with AgentCasting.
Maybe this explains why agents cast sleep on friendly creatures? NOW FIXED.
PROBLEM: The entire rest of the spellcasting system is always ASSUMING
that spells are cast from the cell of the Wizard rather than from wherever
they are being cast from. I don't see how any spells could work properly
with AgentCasting except for CAST_FREE spells. No spell routines take a
CasterCell parameter. They all take a player parameter and just assume the
caster is at the wizard's location. I never play with AgentCasting so
I'll just leave this for SAI to fix.
* MAJOR BUGs in IntelligentComputerSpellSelect() and other routines.
The following macros were all defective and returned wrong results when
used with magic spells instead of "objects".
IsIDundead, IsIDstatic, IsIDmount, IsIDdragon, IsIDgrowth, IsIDinanimate,
IsIDmeditation, IsIDarcher, IsIDflying, IsIDshooter, IsIDspecialcombat,
IsIDweirdattacker.
This was caused by the game not being a real database.
The computer ranking of spells was all messed up because of these bugs.
NOW FIXED.
* MAJOR BUG in IsStupidCast() All CAST_FREE spells were being handled all
wrong. This was totally messing up the computer's thinking. CAST_FREE
spells were routinely being regarded as REALLY_STUPID(-3) when in fact they
were the best and most usefull spell possible. NOW FIXED.
* Test Plasma Beam. Give a computer wizard some Plasma Beams and some bless
spells and see what he does in various situations. DONE.
* ADDED stupidity checking for Alternography.
* AdjacentCell(cell,number) new predicate which allows us to write loops
for handling all cells adjacent to a particular cell 8x smaller. DONE.
Developer debug filesize is currently 2002684 bytes
* REWROTE the following routines using AdjacentCell(cell,number)
and saved the following amounts from the 68000 release executable:
SpecialCombatHandler() saved 1560 bytes
All 7 adjacency routines in predicate.c saved 5428 bytes
PossibleChoice/ChooseAdjacent saved 360 bytes
GoblinBomb() stuff saved 588 bytes
TOTAL SAVED 7936 bytes
We are saving an additional 2k for each AI routine, such as
PlasmaBeamEvaluate(), that uses the new AdjacentCell() technique.
* DEVELOPER version now generates 020+ code.
* ABOVE 2 changes reduced the developer debug filesize to 1983388
SAVED 19296 bytes!
* INCLUDED spellmanager into the archive.
* ExplorationMode option now on setup screen II.
********** MAJOR BUG IN TerminateChaos() *******************************
BUG: Patrick Hawkins reports: If the talklists file is not present then an
alert is generated telling you it isn't there. Then the whole computer
crashes.
BUG: Kermit reports: If you don't have narrator.device then an alert is
generated saying "Could not open narrator.device" then the whole computer
crashes.
BUG: James Conwell reports: If ANYTHING goes wrong in CommenceChaos(), a
file is not found, a library can't be opened, a device is missing, etc.
then a nice alert is generated telling you such. Then the entire computer
ALWAYS crashes.
ALL FIXED NOW.
****************************************************************************
****************************************************************************
MEMORY LEAKS
****************************************************************************
BUG:
1. Delete the file Devs:narrator.device
2. avail flush
3. run chaos
4. avail flush
5. You will now see that you are missing 40 bytes of fastram. :(
BUG:
1. Put the narrator.device file back into devs:
2. avail flush
3. run chaos
4. quit the game on the main setup screen
5. avail flush
6. You will now see that you are missing 192 bytes of fastram. :(
BUG:
1. Run the game.
2. Quit the game.
3. You will now see that you are missing 240 bytes of fastram. :(
ALL THESE leaks are fixed months later in March, 2000 by JC.
*****************************************************************************
END MEMORY LEAKS
*****************************************************************************
**************************************************************************
***** SEMAPHORE BUGS! *****
**************************************************************************
Anything that changes cellp->id or the Exploration status of
a cell or the global PlayerView MUST be done while holding
the semaphore! Else bad things can (and eventually will) happen!
Also, anything that changes or READS the value of cellp->flag MUST be done
with a lock on the board semaphore!
Otherwise, occassionaly, the variables will exist in a state of
incongruency. This could trigger extremely rare, totally unreproducable,
horrible bugs. This one concept might explain ALL of the bizarre
unreproducable bugs that we've ever had in the past.
* FIXED in core.c: ChangePlayerView(); ClearVisible(); PutToSleep(); WakeUp();
RestoreCell(); BackUp(); BackUpWizard(); RestoreCellWizard();
ExploreCell(); CompletelyRecalculateTeamExplore();
EVERYTHING IN core.c ALLEGEDLY NOW FIXED.
* FIXED in chaos.c: CalculateArtifactOwners();
* FIXED in init.c: InitialisePlayers();
* FIXED in io.c: SaveGame(), LoadGame();
* FIXED in move.c: Combat();
* FIXED spells: No spells needed changing.
Ok, that takes care of all the occurrences of .flag and ->flag and .id and
->id. Now I must search for all forms of code such as:
board[cell]=board[c]
board[newcell] = board[oldcell]
etc. etc. ad infintum.
* FIXED spells: hyperclone, replicate, alliance, separation
* FIXED init.c: initialise_players()
* FIXED io.c: LoadGame()
* FIXED warp.c: WarpOut()
Ok, AFAIK all code which needs a semaphore lock now has it.
The game SHOULD be 100% rock solid now.
**************************************************************************
***** END SEMAPHORE BUGS! *****
**************************************************************************
* PROBLEM: Casting Stone to Flesh or Inanimorphobiosis on a wall gives you
a wall which can be moved but it can't actually attack anything. I changed
it so that it will always be able to attack the living and if the inanimate
object was undead then it will also be able to attack undeads. NOW FIXED.
Since I have now implemented AI for Plasma Beam, this allows me to
implement similar AI for a whole range of new beam spells.
* 11 NEW SPELLS: Brain Drain Beam, Demonic Touch Beam, Combat Drain Beam,
Range Drain Beam, Recover Drain Beam, Lethargy Beam, Paralyzation Beam,
Life Drain Beam, Toxicity Beam, Encumberance Beam, Sluggishness Beam.
These spells do not affect corpses or scrolls. Each spell has its own AI
routine.
* MODIFIED the above spells + PlasmaBeam to do the WHITECIRCLEIM instead of the
WHITECIRCLEEX effect in order to keep in tune with my "WHITECIRCLEIM=BAD,
WHITECIRCLEEX=GOOD" concept. Also made them do the cool EXPLODE effect if
it kills a target. Also put in a delay when a creature is killed by a
beam so that your eye can clearly follow the action and see which creature
was killed.
I cast Toxicity Beam on an enemy wizard so that all his recovery stats are
-1 yet his Combat and Maneuverability are NOT going down to 0 like they are
supposed to.
* BUG! Combat, Maneuverability, Ranged Combat and Special Combat
recovery/poisoning don't work right!!! NOW FIXED.
* The holder of the Sword of Sassenrath makes his nearby friends more
intelligent. DONE.
* PROBLEM: cutting and pasting a wizard in the level editor doesn't
"unexplore" the cells that he has already mapped out.
How do we fix this???
We need an option in the editor to RESET EXPLORATION BITS
this will 0 out all exploration bits and then call ExploreCell(cell) on
EVERY cell. The board will then be properly mapped out. NOW FIXED.
You should use the menu option "ResetExplorationBits" right before you
save the final version of your level. If you don't use this menu option
then there may be various creatures who are standing in unexplored space.
Use this menu option as often as you like. It doesn't hurt anything.
A side effect of this is that SAI's most recent level is now much harder
because there are Independent walls everywhere. Previously these walls
existed in unexplored space and so did most of the board, so the Emerald
Dragon Brigade couldn't see you to shoot at you.
Using this new menu option means that all the Independent walls all over
the board will explore the space around them, meaning they can see pretty
much the entire world. This means the Independent archers can shoot at you
long before you can see them. Ditto for Independent dragons, etc.
I assume this is ok with you. If not then let me know and we can work
something out.
For example if you want to make a level where the independents can't see
everything then you can just make all your passageways be composed of walls
belonging to a nonexistent player or even to NOBODY.
****************************************************************************
Codex Sirconia Upgrade
****************************************************************************
* Several small corrections made.
* Problem: There is no explanation of Summoning, only of Subjugation.
7 new paragraphs added. NOW FIXED.
* Problem: There is no explanation of how the world can exist in a
2-dimensional state and yet flying creatures can "fly" "over" other
objects. 2 paragraphs added. NOW FIXED.
Still need to come up with some sort of explanation for undeads and why
they can't be attacked. ???
* Added 1 more paragraph.
* NEW SECTION: "The Folly of Man" to explain generators. 10 paragraphs.
****************************************************************************
END Codex Sirconia Upgrade
****************************************************************************
****************************************************************************
PassRMB(window) BUG
****************************************************************************
* BUG: I was player 1 and I clicked my archer immediately then immediately
clicked the RMB while it was still saying "wood elf" and things got messed
up. I couldn't move or cancel his move. I had to hit the end turn gadget
to be able to shoot and continue.
OK, I put in some code to PassRMB; GetSpellSelection(); TrapRMB; so now the
entire game should be running with TrapRMB except for the spell-selection
phase. ALLEGEDLY NOW FIXED.
However there is probably still a weird bug because for some reason
the HandleIDCMP() does a PassRMB depending on what type of cell return is
requested. I don't think that is right.
Ok I just played a test game and I was able to click on my wood elf and
bring up the menus every single time! I was able to do the "about" menu
and "new game" menu and "scores" from within the movement phase!!!!
And each time I did it, it messed up the movement of my wood elf.
Something somewhere is doing a PassRMB that isn't supposed to.
Ok I have now removed all occurences of PassRMB() from HandleIDCMP()
and the bug is REALLY NOW FIXED.
If those commented out PassRMB()s mess something up then let me know.
(I don't forsee any problems)
****************************************************************************
END PassRMB(window) BUG
****************************************************************************
* Installed Deluxe Paint 5. + Cracked Gold font + Earth Yellow font
(looks good in a comical/cartoony sort of way)
* Put in all of SAI's new spell graphics into the game.
November 25th, 1999:
INSTALLED Chaos 2.70 on JJ's Amiga 3000.
SENT Chaos 2.70 to SAI for use in level-designing etc.
December 4th, 1999:
* ENFORCER HITS if either of the screens or windows fails to open then
enforcer hits are generated by TerminateChaos(); NOW FIXED.
December 6th, 1999:
* MAJOR RMB BUG FOUND. You can access the menus from within the movement
phase with disastrous results. Furthermore you can't cancel your
spellcasts with the RMB thus the game locks up when you cast a spell but
have no legal targets. I found this while playtesting my 3rd level, I had
just got a Summons spell as a bonus spell for killing a ShapeChanger, so I
was going to _finally_ be able to win. I had 7 open squares adjacent to my
wizard so I cast it immediately. I cast 7 good creatures and then I
couldn't cancel the 8th one! So the game was STUCK! ARRRGH! NOW FIXED.
December 10th, 1999: JJ is complaining about his ally's growths growing
over his creatures. And he isn't allowed to attack the growth and kill it
since its his ally. SAI never stated an opinion on this matter so I am
hereby making a
* NEW RULE: The growths of your allies do not grow over your creatures.
Except for Fire and Flood which still attack EVERYONE as usual.
NOW FIXED.
* Recompiled and redelivered v2.71 for JJ.
* Chaos v2.71 FINALIZED. This is the final OS 1.2 / 1.3 / 2.04 compatible
version of Chaos. All future versions require OS 3.0 or higher.
****************************************************************************
Information Screens Upgrade
****************************************************************************
For the next upgrade I will be doing fancy screen manipulation in order to
achieve smooth scrolling AND to be able to utilize a wide range of
different screens which will all use the exact same chunk of memory.
This will allow the game to use a minimum amount of chipram and avoid memory
fragmentation from constantly opening and closing screens.
Using clever arrangement of the screen memory, we will be able to display
e.g. 3 screens at once which will trash the display of all the other
screens, but as those other screens won't be visible, noone will ever know.
When switching back to the original display, the previous 3 screen display
will be trashed, but as it will no longer be visible, nobody will ever
know.
Using this technique we can have a dozen different screens open at once,
all using overlapping chipram. It will simply be a matter of pushing the
correct screens to the front and using them to generate the proper display.
In order for this technique to work, the screens must be in interleaved
format because interleaved format utilizes memory more efficiently.
Also, interleaved screens allow general blitter operations to be faster so
hopefully all those DrawImage() calls will be a bit faster.
Pointers:
-------------------------------------------------------------------------
Display1: NormalDisplay 320x256x6 main screen + 640x256x3 hires screen.
61440 bytes + 61440 bytes = 122880 bytes total
Base=HiResScreen
Base+ 61440 LoResScreen. (main map)
-------------------------------------------------------------------------
Display2: ScrollPanel1Display: 640x1024x4 autoscroll screen + 320x32x6 screen to display the icon.
327680 bytes + 7680 bytes = 335360 bytes.
Base+7680=SP1SmallLoResScreen (320x32x6) (7680 bytes)
Base+7680+7680=SP1HiResAutoScrollScreen(640x1024x4) (327680 bytes)
-------------------------------------------------------------------------
Create various other displays here...
Base+7680 = LoresScreen on standard info panel.
Base+7680+whatever = HiResScreen on standard info panel.
Base+7680+whatever+whatever= HiResScrollingScreen on standard info panel.
* 1: Change all screens to Interleaved. Make neccessary JC-code
adjustments to open and setup the screens in interleaved mode. DONE.
* 2: Change lores screen to be 64 colors and the shadowboard too. This
prepares for the final and ultimate ECS version. DONE. Hmmm.. the
quadrascopes are now slower.
* 3: Adjust asm testpixel code to work with interleaved bitmaps and 64 colors.
TestPixel4_320 is now TestPixel5_320 and it only works on Interleaved BitMaps
with 6 bitplanes.
TestPixel1_320 now only works on Interleaved Bitmaps of 6 bitplanes.
ALL DONE.
YIKERS! 64 color mode drains so much DMA time from the chipram that
now if you move the mouse on the New Game? or End Turn? screens the gfx
slow down dramatically! Perhaps these should be redone on 32 color
screens for speed?
* 4: Adjust asm DoTheHighlighting and UnDoTheHighlighting to work with the
new 64 color interleaved screens. DONE.
WOW! Pressing "l" for line of sight still goes at a nice fast speed
even though it is testing an extra bitplane now and even though the
available bandwidth for testing chipram has been cut in half.
* 5: 64-bit aligned the double-buffering of the rotating pentagrams. DONE.
* 6: REMOVED all that conditional OS 1.2 / 1.3 code from info.c.
Display3: ScrollPanel2Display: same old way for now.
Display4: FileRequesterScreen. Noninterleaved. For Loading and Saving.
* 7: Allocate the screenmem as 1 big chunk then subdivide it in an
overlapping manner for the various displays and screens.
A. Allocate 1 chunk of 343040+4 bytes of chipram. (This is the largest
chunk currently needed) 640x1024x4 + 7680+7680 DONE.
B. Setup the bitmap pointers appropriately. DONE.
C. Open up the 2 new screens. Put the 2 new ones in back for now. DONE
D. Open the appropriate window on each screen. DONE.
* 8. Install TypeSmith 2.5b. DONE.
Ok, TypeSmith is really awesome because it can load and edit
PostScript, Compugraphic, TrueType and Amiga Bitmap fonts!
However, there is no way to see how the chars will actually look in
their normal size while you are editing them so I had to use Deluxe Paint 5
and keep switching screens back and forth. It worked ok. It is clear
that TypeSmith was designed to edit scalable fonts rather than bitmap
fonts. I needed a break from programming so I stayed up all night
designing a bitmap script font that looks really GREAT!
Unbelievably, there is no way to change the width of a bitmap
character from within TypeSmith so I wrote my very first Arexx program!
WOW! Arexx is totally kewl! The Arexx port on TypeSmith is very
nice. I made a script in 8 minutes (including the time to look up the
commands in the online help) that allows me to change the width of chars.
It even worked perfectly on the first try!
I was going to make the ChaosCalligraphy font be 44 points tall for use
on the scroll info panels. This looks AMAZINGLY FANTABULOUS, but then
I realized this would be too big for use on the standard info panels so I
squished it down to 40 points so now it could theoretically be used on
the standard info panels also. The 40 point font doesn't look as awesome
as 44 but it still looks ok.
* 9. Design Awesome Calligraphy Font: ChaosCalligraphy.font/40 9356 bytes DONE.
*10. Implement new ScrollDisplayPanel1
A. Correctly position the screens and print text to them using the
same old font as always in order to test the AUTOSCROLLing.
Ok, I have now wasted quite a few hours trying to get AUTOSCROLLing
to work. The docs don't fully explain it. I finally figured it out
after much trial and error. I now know how AUTOSCROLL works
HOWEVER it is useless on a child screen because the scrolling is
somehow constrained by the parent screen! Grrr.. I consider this
to be a bug in the OS.
AUTOSCROLLING isn't really required. But opening a LARGE screen
which can be manually scrolled IS required. In each test where
AUTOSCROLLING failed, manual scrolling failed also.
So here are my options for making the AUTOSCROLL
ScrollInformationPanel work:
1) Don't attach it to the parent screen. Then it works. The
trouble is then there are 2 open screens in the system and that
annoys people.
2) Do #1 but build in some amiga-m/n detection code into Chaos so
that we automatically depth arranged BOTH screens at once. The
trouble with this idea is #1: I don't know how to do it and #2
I doubt if it would even work.
3) Try to open the parent screen with fake higher top so that it
can move up higher. Thus the child screen will also be able to
move higher. The trouble with this idea is I don't think you can
just go around opening screens with fake tops. I would try this
idea except for 1 MAJOR problem: when the parent screen becomes
AUTOSCROLL in the future, having a fake top means it will AUTOSCROLL
incorrectly! grrr.
4) Figure out some way to poke into the screen->viewport or
whatever and force this to work by making it not be a child
screen anymore or by changing the clip in the viewport or something??
I TRIED THIS AND IT DIDN'T WORK. 8(
5) Make the SP1HiResAutoScrollScreen be the parent screen. If its
the parent it should be able to AUTOSCROLL. The problem with
this is that I don't think it will work because all the other
child nondraggable screens will constrain it from scrolling off
the top.
6) Constantly keep reopening and closing the scroll screens.
It takes 25 frames (half a second) to open the 640x1024x4 screen
and window. It takes 34 frames to open that screen/window + the
SmallLoRes Screen and Window. This is entirely too long to wait.
7) Open 2 child screens of 640x512 each and flip between them when
moving the mouse or pressing an arrow key.
8) Somehow use ScrollVPort() to do the scrolling on the 640x1024
child screen. The problem with this is that experience has
shown ScrollVPort to NOT BE FAST ENOUGH. AUTOSCROLL is
PERFECTLY smooth and so is MoveScreen() but ScrollVPort() is
screwed up.
9) Temporarily make SP1HiResAutoScrollScreen be the parent screen.
This should allow it to autoscroll correctly. Then later on
when the map becomes an AUTOSCROLL screen and the 2 screens
conflict with each other, I'll just make the 2 SP1 screens into
their own separate family. Thus there will then be 2 open
screens in the system at that point.
This might also necessitate making the HiResScreen be DRAGGABLE
again. Hmmm...
DONE.
* NEW FUNCTION: RedrawRightHandSide() to redraw whatever needs to be
redrawn on the right hand side of the map screen. (spell list or gadgets or
whatever. DONE.
B. Adjust colors. DONE.
C. Implement Stefan Burstroem's FastTextFit.asm into the makefile.
The only problem is there are no docs for the routine!
I eliminated the TextExtent parameter since it was not used. DONE.
* BUG: the FastTextFit asm code has a bug so that it usually returns 1
higher than the correct result. NOW FIXED.
D. Implement new 40 pt. calligraphy font on the new Scroll Info Panel.
DONE.
E. Rewrite the PRTPool() function so that the entire text is
decompressed all at once into a buffer then that buffer must be processed
using FastTextFit() to fit the text onto the screen 1 line at a time.
I ended up completely rewriting printer.c. DONE.
F. I had to change PRT_WIDTH to be 1025 DONE.
G. Since I am rewriting printer.c I have converted it to JC. DONE.
* BUG! My pearl.font TextAttr was using FPB_DISKFONT instead of the correct
FPF_DISKFONT! This explains why the pearl.font never worked on my OS 1.3
Amiga 2000 and why it never seemed to work on my dad's A500 or A3000.
Using FPB_DISKFONT is equivalent to FPF_ROMFONT so it APPEARED to work on
my computer because my preferences are set to use pearl.font as the default
system font. This means that NOBODY has been seeing the correct font all
this time except for me! ARRRGGHH!!! NOW FIXED.
* December 16th: First panel of the new scroll display is finally ALL DONE.
Most spell descriptions fit onto 1 screen with the small 40 point font so
the AUTOSCROLLing is not usually used.
*11. Implement new ScrollDisplayPanel2
Hmmm.... How should I do this?
A. Have another screen which is only 640x512 and display the info on
that screen?
B. Simply erase the autoscroll screen and display the data on it?
C. Simply erase the bottom half of the autoscroll screen and display
the data on the bottom half and smooth scroll it up?
ARRGH I can never decide how to do these things!
I guess I'll just do option A. DONE.
* Utilized some trickery to stop the ScrollPanel1 from scrolling when there
is only 1 screen of text. DONE.
* Implement Anti-Aliased, Anti-Flicker text. Technically this is
anti-flicker text, but it also partially antialiases too. DONE.
* TOO SLOW: On my 25 Mhz 68030 it takes 65 frames to bring up the description
of the Cobra. I added in some Mask stuff and rearranged the colors but it
still takes 44 frames. It takes 5 frames to decompress the text, the
other 39 frames are displaying the text in the dead slowest graphics mode
of ECS.
If anyone complains about it being to slow I can do one or more of the
following:
Use the fake 1 bitplane screen.
Add an extra pixel between lines and use the BltBitMap() technique.
Change to noninterleaved and write an asm routine to zap the text up real
fast.
Switch down to 8 colors?
Design the font as a colorfont.
Design the font as 2 fonts. 1 is the normal font an the other is just
the antialiasing.
Try a minterm of 0x77 or 0xEE
I at least need to do the fake screen thing between SP1 and SP2 to cover
up the sloppiness + speed it up greatly!
* IMPLEMENTED: fake 1bpl screen at beginning of SP1 and again between SP1 and
SP2. Damn it still takes 21 frames for the Cobra description. 35 frames
for gooey blob!
* DISABLED CLIPPING: during the text printing only. NO EFFECT. 8(
* Tried JAM2 mode: NO EFFECT. 8(
I could do this: Text() the text to a seperate bitmap buffer.
move.l (bitmapbuffer)+,d0
move.l d0, (FastRamBufferbpl1Y+1)+
or.l d0, (FastRamBufferbplY-1)+
That simple loop will generate the antialiasing.
move.l d0,(FastRamBufferbpl2Y)+ ; to copy the main text also.
Then just copy the bitplanes to the appropriate planes of the screen and
that is all. Maybe I'll do something like this someday. But I'll
probably never get around to it. It doesn't apply to gfx cards.
* NEW POWERUPS shown on Info Screen: Crystal Ball, Ubiquiscope, Seismology,
Cartography, Telescope, Alternography, Fly, Earthbind, Archery,
Nonarchery, Lich/Convert/Materialize/Undead/NotUndead, Sword of Sassenrath,
Mount, NoMount, NoGrow, StoneToFlesh, Inanimorphobiosis, FleshToStone.
I intentionally left out Cursed Sword because its graphic currently looks
identical to a regular Magic Sword.
* PROBLEM: If the game locks up we can't just press CTRL-C to break into
the program. I have now set it so CTRL-C will work in the developer
version. DONE. hmmm... doesn't seem to have any effect.
*12. Implement new InfoPanelDisplay1 IF -i option (InterlaceMode) is set have
it in interlace else have it in non interlace, the old way.
In other words leave the existing info panel 1 code intact. Just add
in an IF (InterlaceMode) InformationPanelInterlace(); return;
InformationPanelInterlace() will call the InformationPanelInterlace1();
A. Open 2 new interlace screens with windows. DONE.
*13. Implement new InfoPanelDisplay2 DONE.
*14. Implement Antialiased text on the new IP1 displays DONE.
(this requires a minimum of 16 colors)
*15. Implement antialiased bargraph boxes to reduce flicker on 1084S monitors.
DONE.
*16. Implement color cycling on the new IP1 displays. Oops color clash.
The original color cycling worked by cycling HIRESGREEN2, but this
color is being used to display the owner. Ok I will use HALFHIRESBLACK
and HALFHIRESGREEN1 for the color cycling colors.
Or I might create yet another screen so that the creature name + owner
can have its own 16 color pallette on ECS. Or its own 256 color pallette
or whatever on AGA.
COLOR CYCLING DONE.
*17. Redo the halfIP1HiResColors to be halfway between the new darkblue
background and the real color to reduce flicker. DONE.
* PROBLEM: the cyan rectangular boxes flicker quite badly on a 1084S
monitor even when antialiased. Solution: draw the rectangles in a darker
color. DONE, but it strangely doesn't seem to reduce the flicker any.
Its very difficult to keep long narrow horizontal lines from flickering
in interlace.
*18. ReImplement Level Editor into the new IP1 displays. DONE.
* There is a hashing problem. I need to make it so that when scrollpanel
exits, clear the whole sp1 display instead of just the map display. DONE.
*19. Fix level editing the rest of the way. Level editor is finally
working again on Jan. 12, 2000.
***************************
*** IP1 Speedup Upgrade ***
***************************
Time to completely display IP1 info panel on 25Mhz 030 A3000:
IP1 display currently takes: 51 frames. A bit over 1 second.
Implement FakeBlueScreen Trick: 30 frames.
Just for fun I commented out
SetRast (IP1HiResRastPort, BLACK); 23 frames. Indicating it takes 7 frames
to do SetRast while a 64-color lores screen is being displayed.
Commented out
RectFill(pr,0,0,320,65); 22 frames. Indicating it takes almost 1
frame just to do that in 64 color mode.
Ok now I'm timing how long it takes to do the rectfill + setrast while
in lores 1 bitplane mode (by pushing fake1bplscreen to front)
27 frames.
25 frames on nothing/nobody.
19 frames by #ifndefing out the current and max numbers.
Implement CopyMemQuick Trick: should be 9 or 10 frames.
15 frames.
14 frames on nothing/nobody.
Eliminated 2 ScreenDepth() calls 14 frames.
13 frames on nothing/nobody.
* Optimize PutScreen() to not move the screen if it is already in the correct
position. DONE. This effectively eliminates 2 PutScreen Calls.
12 frames on nothing/nobody.
* Change all the colors from HiResYellow to IP1HiResYellow etc. DONE.
* Make HalfHiResYellow be color 1. Mask = 1 when writing the antialias color.
Make HiResyellow be color 9. Mask = 9 when writing the HiResYellow.
Should double the speed of number printing from 6 frames to 3 frames.
So I am just switching the positions of IP1HiResYellow<->IP1HiResGreen1
DONE.
10 frames on nothing/nobody.
TOTAL SPEED INCREASE: 5.1x
******************************
*** END IP1 Speedup Ugrade ***
******************************
* Make the small IP1SmallLoResScreen be really small in the OpenScreen()
command. This will fix that lame glitchiness permanently!
DONE.
Ok, the glitchiness is fixed but now the mouse pointer teleports in order
to stay within the bounds of the small screen. This is very annoying.
So my options now are:
A: Revert IP1SmallLoResScreen to be a full 512 pixels high and suffer
with a glitchy display (the glitch is only displayed for 1 frame)
B: Do option A + install a UserCopperList to set all colors to the
background color. This would fix the glitch. But I have no idea how
to install such a UserCopperList.
C: Keep the screen small and just keep track of the mouse position and
restore it. This should work but will cause a "mouse-pointer glitch".
There is no easy way to do this. I'll hafta hack some code in to make
this work. Special thanx to Kalsu for supplying me some example code for
this. This is the option I will attempt.
D: Leave the small screen small and make the big screen be 512 pixels.
Put the big screen at the top of the display and the small one at the
bottom. This would solve all the problems. But then we would have
the pic of the creature and the powerups and kills at the bottom of the
screen. This is the easiest way to fix it. How do you feel about this?
E: Try setting BORDERSPRITES to see if that fixes things.
I really don't want the mousepointer going into the side borders. I
only want it to go into the bottom border area. But there is no way to
specify this so I'm not going to try this option.
* Implement Option C by making a function MoveMousePointer(x,y) DONE
It basically works but the mousepointer flickers and jerks because its
being moved around. So I'm now going to try Option
* F: Make the IP1LoResScreen be the full 512 pixels high but in order
to prevent glitchiness I'll set its color palette so that all 64 colors =
the background color until the screens are all properly arranged. Then
I'll reload the pallette back to its normal setting.
DONE. WORKS GREAT. NO NOTICEABLE SLOWDOWN. NO MORE GLITCHES.
*20. Reduce size of IP1HiResScreen and BitMap and Window down from 512 to 443
(the exact right number) to speed things up. DONE.
The IP1 and IP2 displays are now exactly 512 pixels in height. This
noticeably increases chipram bandwidth since it has eliminated around 16
pixels of vertical overscan.
*21. Snapshot the base IP1 displays using straight 32-bit CopyMemQuick and
copy them in for vast speed improvement.
A. Add in some #ifdef code to cause the numbers and the name and owner
to not be printed. DONE.
B. Simply save the memory of the IP1HiResScreen straight to a diskfile
Screens/IP1HiResScreenMem. 142080 byte file. DONE.
If I ever do the 2nd screen it can be IP2HiResScreenMem.
C. Modify start.c to load in the new Screens/IP1HiResScreenMem file. DONE.
D. Modify info.c to copy the image to the screen instead of using
all those timeconsuming AntiAliasWriteText() calls.
Copy IP1HiResBaseDisplay to IP1HiResScreenMem. DONE.
* Save mouse coords for SP1 screens. DONE
* BUG: Promote() messes up the semaphore when performed on an exposed wizard.
NOW FIXED.
* BUG: Promote() on a scroll can cause enforcer hits. NOW FIXED.
* BUG: Graphics of kills on IP2 screen are messed up. NOW FIXED.
* BUG: Range is being printed over movement on IP1 screen. NOW FIXED.
* BUG: Can't be Smelled/heard/seen is in wrong color and wrong position. FIXED.
* BUG: Unexplored Region / Cloaked not erasing IP1 screen. FIXED.
FLAW: The filerequester uses routines optimized to smoothly scroll on
NONinterleaved screens.
SOLUTION: Simply make the HiResScreen NOT be interleaved.
When I did this the colors got all messed up on the HiResScreen! I have
no idea what is going on. So I'm leaving the screen as Interleaved for the
time being.
Fix bottom screen glitch. DONE.
* Fix screen dragging. Make all screens be nondraggable except for the SP1
screen I suppose. DONE.
*1. Simply put the SP1HiResAutoScrollScreen back to x,-512 every time you
exit the scroll panel. This will prevent the hiresscreen from moving up
and revealing garbage. DONE.
*2. Try making the main map screen (screen) be nondraggable also. DONE.
*3. Try making the fake1bitplanescreen be nondraggable. DONE.
*4. Put the SP2 panel into the correct position with PutScreen(). DONE.
****************************************************************************
January 28, 2000 END Information Screens Upgrade
****************************************************************************
JJ Bug Report for v2.71: ===================================================
* BUG: Promote() doesn't work right. His Undead Green Dragon: turned into
a living Emerald Dragon. Ok I completely revamped Promote() to
intelligently promote every stat. NOW FIXED.
* BUG in Exploration Mode:
Jason cast Moveit but when he got his extra move he couldn't see
anything! However if he clicked on an "unmapped" square he could still
move his units. NOW FIXED.
Recompiled v2.71 into v2.72 and reinstalled on his computer.
==============================================================================
======================================================================
Score Screen Upgrade:
Make it a borderless backdrop window on a 640x512x16 colors interlaced
screen. Just use SP1HiResWindow.
Need 11 lines of text * 40 points = 440 points + 1 blank line = 480 points.
Just 1 screen for now.
Player Scores for Turn x.
Player Team Life Score
9 lines of name + score.
For now I'll use the same ChaosCalligraphyFont40. But maybe I'll use a
different one later when I think of a good one to use.
Use Team Numbers instead of graphical symbols.
What should the colors be???? I need to use something other than dark
blue for the background! For simplicity I'll just use the exact same
colors that are already being used. (Black background).
Try to use the SP1HiResScreen for the Score Panel and Spell Panel.
Oh well I'm tooo tired to care about the colors now. I'm just leaving the
colors as they stand.
* Score Screen now looks halfway decent at least.
=============================================================================
JJ Complaints ==============================================================
* COMPLAINT: When playing in (!ExplorationMode and !TexasTrashem) the
exploration mode related spells should not appear in your spell lists.
Just make a new tag: OnlyUsefulInExplorationMode
Spells with this tag will have their probability set to 0 in the
chaos.prb file. Their probabilities will be normal in the ExplorationMode.prb
file. NOW IMPLEMENTED. Works great.
* Spells which are only useful in ExplorationMode are now only dealt out if
you play the game in ExplorationMode or in Texas Trash'em mode.
* COMPLAINT: He wants a Music OFF feature. NOW IMPLEMENTED. Works great.
================================================================================
* FIXED Magic Sword Description.
* FIXED GooeyBlob spell description from "on recovery" to "after being uncovered"
CHANGED:
* Ropers, Wasp Nests, Pits, Magic Castles and Dark Citadels can now be cast
on dead bodies.
* Rocks now allow 3 attempts.
* Combat Drain Beam damage increased to 8.
* Nonarchery is now known as Archerotomy.
****************************************************************************
InitialData[] bugs
****************************************************************************
Previously there were 3 serious bugs related to InitialData[]:
1. The negative score bug.
2. The isIDcreature() bug.
3. The isIDblahblahetc() bugs (numerous macros were broken).
Current bugs related to InitialData[]:
chaos.c
* BUG: All the recovery code (life recovery, intelligence recovery, etc.) has
code that checks the InitialData[id].Life, etc. But there is NO
InitialData[id].Life for a magic spell scroll! So the return result is
unknown and will be random over time, as spells are changed/added.
It could possibly cause an enforcer hit.
NOW FIXED by using the macro.
* core.c
BUG: The code for GooeyBlob uncovering sets:
b->char_stat.Life =InitialData[b->id].Life >>1;
But there is no such thing for a magic spell scroll! NOW FIXED.
* The WakeUp() routine has an InitialData[id].Weight which does not exist for
magic spell scrolls. NOW FIXED.
* Promote() accesses InitialData[id].Life, etc. This should only be used with
creatures so it should not cause any bugs. NOW FIXED.
* All occurences of InitialData[] replaced with InitialData() in core.c
EXCEPT for InitialData[NOTHING] occurrences.
* move.c/Growth() also accesses InitialData[id] but this should only be used
with growths so it should not cause any bugs. But a scroll of a growth
is still a "growth" so it might someday cause a bug, arggh.
* move.c/Growth() more code for uncovering something covered by a growth
which accesses InitialData[id] for scrolls that have no such thing.
* move.c/Combat() would do an invalid access of InitialData[id] if a magic
spell scroll had HORROR on it.
* ALL occurrences of InitialData[] replaced with InitialData(), even the
ones that were technically 100% safe because in future years after new
object types are added they might become unsafe. Better safe than sorry.
* spell.c/IntelligentComputerSpellSelect() is using the value of
InitialData[id].Life for scrolls which have no such value!
Oops the code is actually ok due to it saying "IF (isIDcreature(sp) and InitialData(sp).Life >s[STRONG]"
I was thinking it said "isCreature" instead of isIDcreature.
I replaced InitialData[] with InitialData() anyway.
DONE.
* cmove.c/GetCellWeight() is using InitialData[id].FavoriteFood and
.RunsAwayFrom! This is wrong for magic spell scrolls.
Replaced with InitialData() macro.
There is already quite a lot of hacked-in code for not using InitialData[]
beyond ExitID and I'm wasting too much time fixing silly bugs that never
should have existed in the first place so I'm thinking of implementing the
objects more as a true database and adding InitialData[] for EVERY id.
This will burn 10 or 20k but since it makes the game more reliable, easier to
code and keeps the code cleaner; it should be well worth it.
The other option is to hack in some IF-THENs for each of the above listed
cases + we would have to remember to do the same each time we add new code
which uses InitialData[id].
A third option is to make some sort of GetInitialData() macro which checks that
the ID is <= ExitID and returns the appropriate value. Then I just
search/replace all occurences of InitialData[] with GetInitialData()
USING THIS OPTION.
#define InitialData(x) InitialData[(x) > ExitID ? 0: (x)] Not good enough
#define InitialData(x) (InitialData[(x) >=0 and (x)<=ExitID ? (x):( (x)<0 or (x)>RevealID ? *(char *)0 : 0))
The above macro will be used because it handles the quirkiness of there not
being InitialData for id's over ExitID _AND_ it does array bounds checking!
more examples in SC:ArrayBoundsChecking.txt
* Replaced all occurences of InitialData[] with InitialData() macro just to
be safe in cast.c and info.c and init.c and all the spell files.
Could just have a "magic spell" bit to delineate the 2 regions?
* Chaos now has Array Bounds Checking, but only on the InitialData array.
Currently for the bounds checking to actually report anything you must run
the game under cpr and have enforcer running. Then bad subscript errors
are trapped and the cursor is placed on the offending line just like in
BASIC.
****************************************************************************
END InitialData[] bugs
****************************************************************************
* BUG: Violet Fungi graph has a line drawn through it. FIXED.
* BUG: The right hand side end turn gadget isn't being redrawn when you
examine an object on the board or a spell in your spell list. FIXED.
Feb. 15th, 2000:
* Incorporated SAI's new arcing weapon effect on all the elves.
Feb. 16th to Feb 22nd: Moving to new apartment. No programming
accomplished.
Feb. 23: Internet account stopped working. My paid subscription ran out.
==========================================================================
Feb. 23rd to 29th:
* 10 NEW CREATURES: Mighty Orc, Oracle, OmniBiologist, Recognomancer,
Memory Master, Memory Mage, Necromancer, Chronomancer, Hippocrates,
Aesculapius.
Mighty Orc who (looks just like an orc / looks like an orc
with a big battleax) Mighty Orc has stats identical to Orc but with 15
combat. Prob=9. Orc has PromotionCount=3, promotes to MightyOrcID
An Oracle could be equivalent to a Crystal Ball.
Just add a .Oracle bit to the wizardinfo struct and check it along with
.CrystalBall
The Oracle has a Crystal Ball which benefits the casting wizard.
Oracle can use a fakewizard graphic #6.
OmniBiologist uses a fakewizard graphic #8. 19 life, 1 combat, 1 move, 0 recover.
The OmniBiologist is a Biologist, Exobiologist, Chronobiologist,
Xenobiologist and Exoplanar-Biologist all rolled into one. He can
instantly recognize any lifeform from any time-period, or from any other
planet, or even from any other plane of existence. Upon viewing any
scroll, he can recite from memory the complete statistics for any creature.
If he can make 3 kills he promotes to Recognomancer.
Recognomancer fakewizard graphic #7. 19 life, 1 combat, 1 move, 0 recover.
Either 2 ranged combat against mr (range=3) or make him have actual lightning
bolt spells. Graphic of Wizard with staff.
The Recognomancer is similar to the Omnibiologist but he carries a deadly
magic staff, making him much more lethal in magic combat.
Memory Master Shade Graphic (stats of Ogre) + .memory bit set
The Memory Master has perfect Eidetic Memory and will always remember what
is under the object in any square on the board.
Memory Mage similar to Ogre Mage! Shade graphic. (stats of OgreMage) + .memory bit set.
Aesculapius is The Roman god of healing. 0 combat. -4 combat against all non
recovery rates. Range=3. Archery. Max recovery rates in everything.
Special Combat -4 against life only. Fake wizard #5.
Hippocrates: 0 combat -3 ranged combat against life only. Range=1.
The legendary Greek healer. Special Combat -2 against life only.
Fake wizard #4.
Necromancer: #3 (casts Kill and Raise Dead 33% of the time.)
Chronomancer: #2 (casts Vanish 20% of the time.)
3 new special creature types:
.Memory (remembers what is under a cell. Elephant, Memory Master, Memory Mage)
.RecognizeCreatures (allows you to see the stats of scroll creatures +
recognizes the creatures in your bonus spells list.
OmniBiologist and Recognomancer)
.Oracle (equivalent to having a CrystalBall. Oracle)
* Need the above 3 in the wizardinfo struct also. DONE.
* BUG in sm.c: It won't process my creatures with negative combat or
negative ranged combat. NOW FIXED.
* Special Programming for Oracle done.
* ELEPHANT now has perfect Eidetic Memory.
* INFO PANELS modified to show you what is under the cell if you have the
memory powerup.
We might want to make a graphic that means "You currently possess the
perfect Eidetic Memory Powerup" to be displayed as a wizard powerup in
ExtraDisplay(); If anyone wants to draw or render or rip such a graphic
then please do so.
Should there be an "Eidetic Memory" spell? It seems too weak. Its better
to cast a creature that has Eidetic Memory built-in.
Need to add code so that if you have the .Recognize powerup, pressing the
LMB on the 2nd info panel of a scroll brings up an info panel of stats
showing the InitialData[id] stats. So how do I do this?
I can't simply make a pointer to a fakecell and call the InformationPanel()
with this pointer because InformationPanel() has code which requires a
numeric cell number. Actually there are only 2 lines of code which require
a real cell number and they are related to exploration. (A long time ago I
had to take the exploration info out of the cell structure because it saved
me a LOT of problems rewriting code... however the price is that it is now
causing me THIS problem) Luckily this is easily worked around.
Options:
A: allocate memory for an extra cell in board[] and use that as a fakecell.
Then the cell will have a real number. This would be very easy to do but
would wreak havoc with the array bounds checking. DO NOT DO THIS.
B: Change the InformationPanel() cell parameter so that -1 means "This cell is
a fake cell" and then add in 2 if-thens to not use any code that
requires a real cell #. (only the exploration-related code requires a
real cell number due to exploration bits not being contained in the
playCell structure.) DONE.
* Now I can simply make a pointer to a fake cell struct and call
InformationPanel() on that fake cell struct! Easy.
* If the wizard possesses the .Recognize powerup then pressing the LMB on the
2nd info panel of a scroll brings up an info panel of stats showing the
InitialData[id] stats. DONE.
* New Routine: RecalculatePowerups();
Casting the memory master gives you the Memory powerup.
Death of memory master makes you lose the powerup.
Ditto for RecognizeCreatures powerup and Oracle powerup.
A death or warp requires a total recalculation.
A birth/insert doesn't really need a total
recalculation it just needs a simple test on the 1 creature.
For simplicity I will do a total recalculation in every instance since
deaths/warps/births/inserts don't happen very often so cpu speed is not
essential. Also doing the total recalculation each time will help to
"cover up" future bugs whereby some new spell does something wacky and
forgets to call RecalculatePowerups();
Do creatures which are in the underpart of a cell provide powerups?
I am going to say YES because:
#1: Its easier to code it that way.
#2: It sort of makes sense that an Oracle underneath a growth would still be
able to see things with his crystal ball. (ok not really... but..)
It sort of makes sense that a Recognomancer under a growth would still
be able to recognize things by the wizard sending him a mental image of the
thing to be recognized.
It sort of makes sense that a Memory Master would still remember
everything while he is under a growth.
#3: Nothing needs to be recalculated just because something went from the
underpart to the visible part of a cell (or vice versa).
* Added in code to call RecalculatePowerups() in all appropriate core.c
functions EXCEPT BackUpCellWizard() and RestoreCellWizard() because I'm
not sure how those do/should work.
Unfortunately RecalculatePowerups may get called 2 or 3 times in certain
routines like Reinstate.
* Added in code to call RecalculatePowerups() in warp.c.
That SHOULD cover all the places that need RecalculatePowerups() added.
However if there is any place in the code that removes some thing from the
board or puts something on the board without using 1 of the above routines
then there will be a slight bug. Should such a thing happen it will be
neccessary to modify the offending code with a call to
RecalculatePowerups() or modify it to use one of the above routines.
* BUG: EditorPaste just puts stuff into a cell without using
InsertCreature() and it doesn't ever call RecalculatePowerups(); so
inserting Oracles, Memory Masters, Omnibiologists etc. doesn't give your
wizard the appropriate powerup. NOW FIXED.
* BUG: RecalculatePowerupsFlag was a BYTE instead of a LONG so it was
completely and utterly broken. NOW FIXED.
* 3 NEW STATS:
.RecognizeGrowths (MullacDeIrvine)
.RecognizeInanimates (Inanimatologist, Inanimage)
.RecognizeSpells (Recognomancer)
Recognomancer has all above stats set to true.
* 3 NEW CREATURES:
Mullac De Irvine: like a undead fake wizard but can recognize growths. (Wizard graphic #1)
4 kills promotes to Recognomancer.
Inanimatologist: Can recognize Inanimates (walls, trees, etc.) Needs a graphic.
3 kills promotes to Inanimage.
Inanimage is like an Inanimatolgist with the stats of an Ogre Mage. He
heals the friendly inanimates around him. (Same graphic as
Inanimatologist)
* HORRIBLE BUG in sm.c: I have a line in the Recognomancer.spl file:
Stat: STANDARD_CREATURE | STATIC_STAT | RECOGNIZECREATURES_STAT | RECOGNIZEGROWTHS_STAT | RECOGNIZEINANIMATES_STAT | RECOGNIZESPELLS_STAT
It absolutely refuses to process this line. It gives bogus errors and
screws up the compilation. It says "Unexpected white space in tag Stat"
"Ignoring rest of line in attempt to recover."
Ok, the problem was that the LINE_LENGTH in sm.c was set to 128 and after
the 128th char it tried to process the rest of the line as a "Stat:" tag
(?) Anyway I changed LINE_LENGTH to 256 so its ALL FIXED NOW.
* Bonus Spell Selection now prints the name of the spell you are pointing
at (if you have the appropriate .recognize powerup) at the bottom of the
screen.
Should I allow "q" to work on the bonus spell screen?
Or should it just tell you the name of the thing you are pointing at?
* 2 new bits: .RecognizeProgramming and .Ibrowse (mind reading).
* 2 NEW INANIMATE OBJECTS:
Burstroem's Browser: Allows you to browse through other people's spell lists.
Optometron of Omniscience: sets all .recognize bits + .RecognizeProgramming
+ .Memory + .Ibrowse
I couldn't decide how to implement the encryption of the programming files
so I haven't implemented the .RecognizeProgramming feature yet.
I guess vampire.c just needs to be rewritten as FastVampire.c to load an
entire file in and encrypt it and write it back out. The current version
of vampire.c is entirely toooo slow and greatly reduces compilation speed.
Just copy coding techniques from jcformat.c into vampire.c.
Copy everything into sc:chaos_2.81 before I attempt this stuff!
I might screw everything up!
Special programming for the .Ibrowse bit:
Just make a simple modification to
1: RedrawRightHandSide(): NONE NEEDED
2: Simple modification to the BoardUpdate(); DONE
3: Simple modification to GetSpells(); Just had to move the .necro and
and .forgot random clearing code to BoardUpdate(); DONE.
4: DisplaySpellList(); NONE NEEDED
5: Some complicated mods to HandleIDCMP(); DONE.
_________________________________________________________________________
When I compile I am getting an error in line 2681 of chaos.c
"Error 218: declaration found in statement block"
This is useless. And I have no idea where the problem is or how to fix it.
When I JCformat chaos.c it tells me:
"Error in line 2416: Ending does not match beginning."
This is yet another example of a C compiler giving a useless error on a
line when the REAL error is hundreds of lines of code away.
* Problem fixed in 2 minutes thanks to JCformat.
__________________________________________________________________________
March 5th, 2000.
* If you have Burstroem's Browser or the Optometron of Omniscience you can
now press ctrl-# to browse through other player's spell-lists! Its very
cool! Pressing the "end turn" / "return" gadget exits the
browsing/peeking/mind reading back to your normal spell-selection. DONE.
==========================================================================
* BUG: An Independent Aesculapius keeps shooting my creatures and healing
them. NOW FIXED.
* BUG: All enemy creatures with negative combat (Hippocrates and Aesculapius)
keep healing their enemies and NOT healing their friends. NOW FIXED.
* BUG: A human player cannot attack his own stuff with his healing
creatures. NOW FIXED.
* NEW FEATURE: You can now attack your own creatures if such an attack would
heal the creature.
* BUG: Healing attacks make no sound and no graphical effect. NOW FIXED.
* New bit: EXOPHAGY_STAT
* New stat BYTE char_stat.Scavenge (allow for negative numbers)
* 4 NEW SPELLS: Eidetic Xenogenocide, Mnemicide, Scavengerism, Exophagy.
* IMPROVED AI: I made a new FLAG_HIGHCOMBAT bit to help out the AI of the
DemonicTouch and Exophagy spells.
* Eidetic Xenogenocide has its own special AI routine to decide when to
cast it.
* Scavengerism provides +8 Scavenging to any scavenger or +4 scavenging to
any nonscavenger. A scavenger eats corpses. Bon Apetit!
Scavenger/Nonscavenger is determined by the InitialData[id].
(isIDscavenger(id)). Should be as common as Recover Boost.
* Exophagy is the act of eating your enemies alive. Yummy. Half of the
damage you inflict in hand-to-hand combat will be added to your life force.
Should be as common as Recover Boost.
* BUGS: Sleeping Ropers teleport, Sleeping Haunts change sides, Sleeping
Volcanos explode, Sleeping Spriggans fall asleep and Sleeping Meditations
Collapse. NOW FIXED.
* IMPLEMENTED special code into BoardUpdate() for handling scavenging on
March 8th, 2000.
HandleScavengerism drains your ScavengerValue*2 from the dead creature
beneath you and gives you ScavengerValue of points to your life.
You can't drain more life than the corpse has.
When you drain a corpse down to negative of its normal maximum it is
devoured and disappears.
You can't gain more life than your normal maximum.
Scavenging always happens AFTER regular healing with recovery rates.
I have not tested negative scavenger values. They might freak out. Who
knows?
* NEW SCAVENGER ABILITY:
Vulture +2, Giant Rat +4, Neo Otyugh +4, Tyrannasaurus Rex +5,
Dire Wolf +2, Arctic Wolf +2, Orc +1, Mighty Orc +2.
I might try to make Exorcist -1 later.
* ADDED Scavenger to the 1st info screen. It is only shown for those
creatures that actually have a Scavenger value.
* BUG: Speech for Neo-Otyugh and Inanimatologist doesn't work! NOW FIXED.
* ADDED Exophagy to the 2nd info screen + the level editor.
* ADDED Exophagy to the combat system.
* Currently exophagy only applies to LifeCombat. So damaging an opponent's
intelligence doesn't gain you any intelligence. Perhaps this should be
changed? This exophagy concept needs to be playtested.
Enhanced scavenging mode:
1: If there is no scavenging going on this turn then don't play the music.
2: Play the scavenging music. modified ChaosTheme42
3: Count up how many creatures will scavenge this turn. Divide this number
into 7 seconds (350 frames). This is how much time each creature will be
highlighted.
Highlight time not to go lower than 50 frames. So 7 seconds is long
enough for 7 scavengers. The mod can just be position 16 and 17
"eatem up yum yum" then 6,7,8 then looping. 35 seconds of music is way
longer than I'll ever need. That's enough for 35 scavengers. It will take
at least 21 scavengers to get to the cool part of the mod.
I'll try to work out some way so that the Scavenging Phase can flow into
the Artifact changing phase
So 7 scavengers or less plays Mod A. (1 pattern of eatem up yum yum then
the wild pattern happens at the same time as the screen for
"Artifacts Changing Wwners Phase".
So 8-14 scavengers plays Mod B. (2 patterns of eatemup yum yum then the
wild pattern happens at the same time as the screen for "Artifacts
Changing Owners Phase.
Possibly should put in some sort of "Dammit he stole my artifact!" or
"He stole my artifact!" into the mod.
Mod AA is for the short 1st part + the wild part with "He stole my artifact!"
Mod BB is for the double 1st part + the wild part with he stole my artifact!"
4: Highlight the creature and do a WriteNearBottom: James's Neo-Otyugh eats
some Red Dragon Meat. Life +4. Wait 50 frames. NEXT.
{flesh,meat,carcass,corpse,cadaver}
{eats,chows down on, munches on, nibbles on, drinks, sucks on, slurps down,
scarfs down, chews on, feasts on, ingests}
"%s's %s {eats} some %s {flesh}. Life %+d"
HORRIBLE BUG: When I added 2 new lists into TalkLists I started having
enforcer hits and crashes. I ran mungwall/sushi and got tons of mungwall
hits. I think I fixed one longstanding mungwall problem but I haven't yet
been able to stop the current problems and crashes. When I use the old
talklists file, everything works fine as before. This is all very strange.
Several days later: I narrowed the problem down to 1 of the 2 following
lines of code by simply inserting TerminateChaos(0) at various points in
the start.c startup code.
One of these 2 lines is totally trashing memory and corrupting things:
start.c/CommenceChaos()
IF (!(ListNameArray=(char **)malloc((NumberOfLists+1)*8))) THEN
TerminateChaos(CHMEMORY_ERR);
END_IF
start.c/TerminateChaos()
IF (ListNameArray) free(ListNameArray);
So either malloc() or free() has horrible bugs (which seems highly
unlikely) or there is some other bug somewhere that is trashing some of
the memory holding the code for the malloc() and/or free() functions (this
seems AMAZINGLY unlikely, since trashing some program code would normally
produce an ILLEGAL INSTRUCTION guru.)
I have replaced that particular malloc/free with AmigaOS AllocMem/FreeMem
and now the program SEEMS to be working perfectly with no enforcer hits and
no mungwall hits. HOWEVER, it is my opinion that there is still a bug
somewhere that is trashing memory because I just ran and quit chaos twice
and then typed "smake" in the shell and sc gurued with exception 80000004.
During the last few days of trying to kill this horrible bug I found some
other hideous bugs that I fixed.
* BUG: You cannot use the same struct NewScreen to open 2 different
screens. If you do there will be lots of hideous mungwall hits deep in the
OS where X bytes of memory are allocated but only X-y bytes are freed.
NOW FIXED.
I think the same thing might be true for struct NewWindow so I modified the
intro code to use 2 seperate NewWindow structs.
* MEMORY LEAK: Each time that CloseWindowSafely() is called results in a
34-byte memory loss. I have no idea why this is happening since
CloseWindowSafely() doesn't allocate any memory! I didn't write
CloseWindowSafely(), I simply copied it from the Amiga Developer's CD
Oh well... I have replaced all calls to CloseWindowSafely() with old
fashioned CloseWindow() and now there are NO memory leaks in Chaos! YAY!!!
* BUGS: I still get a mungwall hit + bizarre crashes with zillions of other
mungwall hits (sometimes from input.device or Iprefs or CygnusEd, etc.)
each time I run chaos, set the options then immediately quit on turn 1
without doing anything. So I have now replaced 2 of those other mallocs
and now everything seems to be working perfectly. THIS IS VERY STRANGE
because I replaced the malloc()s with AllocMem() but FORGOT to replace the
free()s with FreeMem()!
1. reset puter
2. run muforce stdio
3. run muguardianangel nametag nostackwarn
4. run sushi asksave
5. run cpr chaos
OR
1. reset puter
2. run c:enforcer/enforcer stdio
3. run mungwall task chaos nametag
4. run sushi asksave
5. run cpr chaos
MuLink.lha dev/misc 94K 4+Memory protect selected hunks of binaries
Mem2_2.lha util/moni 39K 77+Memory viewer, editor and browser
memtest.lha util/misc 12K 357+Memory Tester
* BUG FINALLY SOLVED: Ok, the REAL problem was in the TalkList file
handling. There were various FOR-NEXT loops that went while
p<=TalkListBufferEnd when they REALLY should have said p<TalkListBufferEnd
Also, I was only doing AllocMem(NumberOfLines * sizeof(char *)) instead
of the C-proper AllocMem(NumberOfLines+1) * sizeof(char *))
BOTH OF THESE BUGS NEVER WOULD HAVE HAPPENED IF C HAD ARRAY-BOUNDS
CHECKING! It took me 18 hours to track down and fix these bugs.
ALL IS NOW FIXED! (March 19, 2000)
* All appearances of malloc() and free() not working were just terrible
side-effects of writing 2 elements beyond the allocated memory!
* Make a modified "Eatemup yum yum mod" to play during the scavenging and
artifacts-changing-owners part of the board update. DONE.
I am taking Blocks from Song 0 and using them in the other songs
Block 22 becomes block 0
Block 04 becomes block 1
Block 05 becomes block 2
Song 1: 22, END (SHORT Scavenge music 7 seconds)
Song 2: 22,22, END (LONG Scavenge music 14 seconds)
Song 3: 22, 4,5 Loop back to 4 (SHORT Scavenge + Artifact music)
Song 4: 22,22, 4,5 Loop back to 4 (LONG Scavenge + Artifact music)
Song 5: 4,5 END (Artifact Changing Music ONLY)
Do enhanced "Artifacts Changing Owners Mode"
I guess I should divide 14 seconds by the number of artifacts that will
change. But it should be at least 1 second per. And no higher than 7
seconds per.
* BUG: startmod ONLY plays song 0 regardless of the supplied song paramter.
MUST reassemble the music replaying code with debug info so I can trace
through and debug this crap! But I'm in a hurry so I have worked around
it for now by simply doing:
loadmod("filename");
playmod(songnumber);
This works. But sometimes it doesn't work the very FIRST time you do it.
So there are yet more bugs in the music playback system 8(
However:
loadmod("filename");
playmod(songnumber);
playmod(songnumber); seems to make everything work ok. Just double up the playmod() command.
* Make a new StartMod() function that works around the bugs by doing:
loadmod()
playmod()
Delay(1);
playmod()
Then replace all occurrences of startmod and loadmod/playmod with this new
routine! DONE.
StartMod(0) doesn't work correctly on song 0 for some unknown reason. So
I am still using startmod(0) for playing song 0.
* I had all those startmod() problems and implemented all the fixes back
when I was writing beyond the bounds of my allocated memory in the TalkList
file handling. So perhaps that was real cause of the problems?
Weeks Later: No, the subsongs till usually freak out the very FIRST
time they are played.
March 21st, 2000:
* Sound sample playing cli command implemented.
* New End of Turn sound implemented. (I really hated the old one.)
* New healing sound for combat that heals.
* BUG: Sound sample cli command always crashes when played from within
Chaos and when typed as an actual command in a shell window while chaos is
running, it doesn't crash but it just never quits either (until you send it
a ctrl-c) NOW FIXED.
* BUG: When a creature attacks your SpecialCombat stat, your SpecialCombat
stat always becomes -15. NOW FIXED.
* PROBLEM: There is a delay when playing sound effects with the cli
command. This is due to 3 things:
1. The command must be loaded from the hard drive. This delay could be
reduced by putting the command into the ram: disk. DONE.
(It could be eliminated by making the command resident (requires
recoding))
2. The memory for the buffers must be reallocated each time it is run.
3. The sound file must be loaded from disk each time. I could eliminate
this by loading frequently used sounds into memory... or the Ram: disk.
4. The animation system is running in 64 colors and its slowing other tasks
down.
* PROBLEM: Aesculapius's shooting attacks increase the target's
SpecialCombat. So I've got several creatures now with SpecialCombat but
their SpecialCombatApply and SpecialCombat Except bits are not set so their
Special Combat is attacking EVERYBODY (enemies, friends, scrolls,
everything). But since SpecialCombatApply is not set, no actual damage is
done.
I have 2 options for fixing this:
A: Set every creature to have a default SpecialCombatApply of life and
SpecialCombatExcept of FRIENDLY.
B: Change Aesculapius to not attack SpecialCombat. This option is the
easiest and since Aesculapius is incredibly powerful already I'm going to
do this option. DONE.
* BUG: Sound sample player cli command ALWAYS freaks out when running 2 of
them at the same time. (but only when using the -2 option)
NOW FIXED by allocating the sound channels at maximum priority.
* BUG: sometimes the sound sample player cli command never exits.
This might have something to do with either:
A: It tries to output an error message and hangs for some reason?
B: It hangs when it can allocate the first audio channel but not the 2nd
one.
C: It hangs due to strangeness in the Audio.device code.
D: It hangs due to music system "stealing" the sound channels while it is
still playing. This SHOULD be impossible but it appears to be exactly
what is happening.
Possible solutions:
A: Each time I run JCSound I will soon afterward do a WaitJCSound(); Thus I
will never try to run 2 of them at once.
B: Modify JCSound to output a message when it is finished to a pipe:file
that Chaos will check.
C: Modify JCSound to send Chaos a ctrl-d when its finished so I can Wait on
it.
D: Assume scenario D: above is true and simply make the Music system Wait
for JCSound to finish before starting. DONE. SEEMS TO WORK PERFECTLY.
--------------------------------------------------------------------------
---------------------- WaitJCSound routine -------------------------------
* WaitJCSound() routine. DONE. Uhmmm... It doesn't work.. FindTask() NEVER
finds my tasks by name! 8(
OPTIONS:
1. Use SASC Fork() and Wait().
Advantages: Easy to wait for it to complete. Don't have to muck
around with messageports and things.
Disadvantages: Fork REQUIRES that the code be a program stored on disk,
thus there is a slight delay while the code is loaded.
2. Use AmigaOS CreateNewProc.
Advantages: Can directly call code in the main program as a
subtask/subprocess.
Disadvantages: I'd have to rewrite JCSound to be internal to the main program.
I'd have to create some ExitCode to send the main
program a message when JCSound is finished. This
requires making a secret messageport to check.
3. I could just rewrite JCSound to take an extra MessagePort parameter and
then JCSound would simply send a message to that port when it is finished.
3A. Or I could rewrite JCSound to do a FindPort() for ChaosJCSoundPort
and send a message to it when finished.
4. I could rewrite JCSound to be internal to the main program AND it will
simply run continuously and send the main program a message when it is
finished. This way it doesn't have to keep reallocating its buffers and
stack and everything!!!!!
Advantages: Only have to CreateNewProc on it ONE TIME.
It would always be loaded into memory and would be
instantaneously fast at getting started. No more waiting
while it allocates all its memory and stuff.
Disadvantages: It must CreatePort() a message port to receive various
messages such as: START, STOP, UNLOAD.
Or perhaps it could just respond to ctrl-c etc.
OK, the problem is that when you run a program in a cli the taskname is set
to "CLI 6" or somesuch. I tried putting in a
SetProgramName("ChaosDigitalSoundSubProcess") into JCSound but it still
didn't put that name into the tasklist, just in some other "command list".
So now I have simply changed FindTask() into FindPort() to see if the
subprocess is still running. Finding a port by name seems to work
perfectly. NOW FIXED.
---------------------------------------------------------------------------
There will be a completely seperate cli command called ChaosBackgroundMusic
which will only be run if streaming background music is activated. It will
run in looping mode until it recieves a ctrl-c.
I've decided not to use the PlayADPCM command due to the fact that hard
drive storage is sooo cheap these days. Hard drive space is not a problem
anymore.
* JCSound is currently 18640 bytes in size. I am now recompiling it with
optimize. Now its 17948 bytes in size. SAVED 692 bytes.
* ADDED in some code so that combat sounds can be added by the end user by
simply putting an 8svx sound file into the dir Sounds/Combat/Monster Name
where "Monster Name" is the exact name of the monster that will play this
sound effect when attacking. The name must be exact. It is
case-sensitive. Spaces must be correct also. Do NOT place an extension
such as .8svx onto the filename.
Now when someone is playing the game and they say "Hey! I have a GREAT
sound effect for this monster! I wish I had some way of adding it to the
game.", they can really do it!
------------------------------------------------------------------------
STRANGE BUG: I just did a "smake clean" then "smake" and no errors are
reported but when it gets to the linking phase slink complains that
_GeneralImages has not been defined anywhere. I searched through the
entire program code and, sure enough, GeneralImages is not defined
anywhere.
GeneralImages is supposed to be defined in creature.d.
Creature.d is created by makedata which comes from makedata.c which comes
from graph.tex.
makedata makes creature.d by processing makedata.txt.
What makes makedata.txt?
The spellmanager script makes makedata.txt by joining a bunch of files
together!
JOIN ram:image1.tmp ram:image2.tmp ram:image3.tmp ram:imaged.tmp makedata.tmp AS makedata.txt
Above line is unchanged in all my old version of chaos
so makedata.tmp must not be getting made correctly!!!
Uhmmm... makedata.tmp DOES NOT EXIST. It is NEVER created or modified by
anything anywhere!
However in the makefile there is this curious construction:
creature.o: makedata initial_data.c
makedata
copy ram:images.tmp creature.d
type ram:il.tmp >>creature.d
delete ram:images.tmp
delete ram:il.tmp
sc $(STDOPS) nodebug optimize memorysize=huge creature
makedata is used to creature creature.d and then the type command is used
to join "il.tmp" onto the end of creature.d. So I guess il.tmp is not
being created properly.
But makedata.c is simply processing whatever is in makedata.txt!!!!
I cannot figure this out!
Ok I sort of figured out what was actually missing from the program and
hand edited everything to work. This took a couple of hours and made me
late for work. I imagine this is all going to happen again the next time I
add new spells to the game and must completely recompile everything.
I fixed this months later once I discovered that a *.tmp file was missing
in the directory.
------------------------------------------------------------------------
* BUG: When playing Texas Trash'em Select a spell, then examine a spell.
When you are finished examining your spell only the part of your spell list
up to the point of the spell that you are casting gets redrawn. The others
are not redrawn. This is a problem in DisplaySpellList(). NOW FIXED.
=========================================================================
* Modify the combat routine to play the combat sound if present for
this monster. DONE.
What the hell do I do now? Do I make a NEW ROUTINE called:
CellEffectWithDigitalSound()
Disadvantages: It would HAVE to duplicate all the gfx code of CellEffect()
therefore it seems stupid.
Advantages: Don't hafta go through and add ,NULL to all function calls.
Or do I just add a new parameter to CellEffect()
Disadvantages: Hafta add ,NULL to all existing CellEffect() calls.
Advantages: Allows me to mix and match any gfx effect with any sound
effect.
I am going to send in a char * parameter which points to a string which
contains the filename. Here is the BIG problem!
I don't want to have to constantly do
sprintf(text_store,"Combat/%s",creature_name[x]);
I could JUST pass in ,creature_name[x]) THEN IF it is a ATTACK sound then
CellEffect will assume the Sounds/Combat/ part of the filename and do the
sprintf itself.
* Changed Jillions of CellEffect() calls to also pass a ,NULL parameter.
Hopefully within a year most of these NULLs will be replaced with real
digital sound effects.
=========================================================================
0. Assign a couple of sound effects to test out the system!
Ok it works BUT OMSS 1.03c and DSS8 and SFX3.50 all refuse to save the
playback speed information into the sound sample! So the speeds are all
wrong!
OPTIONS:
A: DL that little ratechanger cli proggy from aminet.
samrate15.lha mus/edit 12K 128+Changes pitch of 8SVX samples
No, this is a pitchshifter which is very nice but not what I want.
B: Switch to a new sample editor program from aminet or from my
collection. There are about 2 dozen different ones! I have no idea
which ones to try! I guess I'll try the 10 year old AudioMaster 4.
I FINALLY FIGURED IT OUT. In OMSS you must hold the mouse button down
and simultaneously press a note key to register your note. THEN from
within the Sample Editor Window you must select
Tools/Copy Pitch/Sample Editor -> Inst. Default
* BUG: If you have a creature that has Ranged Combat and he is attacked
by a Range Drain Beam spell such that his Ranged Combat is reduced to 0
then a subsequent Range Boost spell will NOT work on him! Simply put:
the bug is that Range Boost does not work on creatures with 0 Ranged
Combat EVEN THOUGH they had some "initial ability". NOW FIXED.
* INSTALLED over 50 new digital sound effects into the game.
* The Eagle has a real Eagle sound when attacking.
* The Vulture has a real Vulture sound when attacking.
* The Crocodile and ShapeChanger have a real Alligator sound when
attacking.
* Magic Glass now makes a breaking glass sound when it is killed.
* Dire Wolf yelps when it dies.
* Arctic Wolf whimpers when it dies.
* All Dragons make hideous screams when they die. They are now 4x as much
fun to kill!
* When you kill a generator the crowd goes "Aaaaaaaahhhh" in amazement.
* Jaguar and Leopard go "rrreeeeeooooowwwwwrrrr" when they die.
* Stone Giant says "I kill you!" when he kills someone.
* All Ogres say "Attack!" when they attack something.
* All dragons, cats, Hydras, Bears and Tyrannasaurus roar when they attack.
* Neo-Otyugh makes an eating sound when he attacks.
* All Wolves howl when they attack.
* Robot makes a mechanical sound when it attacks.
* All Horse-like creatures make real Horse-like sounds when they attack.
* Gorilla makes a real Gorilla sound when attacking.
* Fire Demons and Devils laugh evilly when attacking.
* Ghost goes "wooOOooOOooOOoo" when attacking.
* Camel makes a real Camel sound when attacking.
* Water Elemental makes a water sound when attacking.
* Fire Elemental makes a burning fire sound when attacking.
* Air Elemental makes a wind-blowing sound when attacking.
* Earth Elemental makes a rocks falling sound when attacking.
* King Cobra makes a rattlesnake rattling sound when attacking.
* Stone Giant goes "OOOORAAH!" when attacking.
* Wolverine growls when attacking
* Bodak and Bird-Lord make sounds when attacking.
I need to have some sort of generic attacking and dying sound for all those
wimpy bipedal creatures. Any ideas?
* INSTALLED 3 new chaos theme songs on March 29th, 2000.
* CHANGED scavenging to drain as many points as are gained. (It used to be
2x as many.)
====================== JJ Bug Report: ==============================
* BUG: Turmoil caused wizards to be riding independent generators, fauns,
etc. This was caused because TurmoilHandler() ONLY checked if the source
cell had a mounted wizard and moved the wizard correctly. It wasn't
checking if the destination cell had a wizard. NOW FIXED.
* STUPID: Wizard cast Restoration on his cloaked, combat, magic shielded
wizard. I changed it so wizards no longer cast restoration on their
cloaked creatures. NOW FIXED.
* BUG: Wizard is engaged to a creature. Wizard attacks magic wood tree and
kills it thus immediately moving into the space and disappearing into lala
land. Ok, I have now made it so that if a wizard is engaged he cannot
attack, mount or move onto any meditation. It will simply say
"You cannot enter a meditation while engaged". NOW FIXED.
* BUG: Necropotence usually causes the game to lock up.
I played a game and cast Necropotence on a computer wizard and he cast
Necropotence on me several times but nothing bad ever happened.
Ok I'm trying it again this time I've set it up so that the computer guy
doesn't have ANY creatures, thus if I Necropotence him he'll have NO spell
to cast. It locked up in an infinite loop. NOW FIXED.
=====================================================================
* REDUCED THE VOLUME of the algorythmic sound effects so they don't
overpower the digital ones. Technically they have always been too loud.
A perfect sine wave going from +127 to -128 is really too much.
I've reduced it to +90 to -90.
* CHANGED Vampire to have -4 recovery + exophagy so that when he attacks he
recovers 1 point. If he does not constantly feed on creatures he will
soon die.
* SWAPPED the ranged combat stats of Shadow Dragon <-> Pseudodragon so they
would make more sense.
* PROBLEM: You can get an Iridium horse in every single game because a
typical game includes 2 or more aviaries, thus Bird Lords are abundant and
its only a matter of time till you get an Iridium Horse. This whole
thing is actually a bug. Iridium Horses are SUPPOSED to only be made
when killing a DRAGON (or a Tyrannasaurus Rex). NOW FIXED.
* Now using the "Hallelujah" choir sample for the bonus spell noise.
* ADDED IN THE CODE TO PROCESS Sounds/Kill/ and Sounds/Death DONE.
Now anyone can make a sound effect for when a creature kills something or
for when a creature dies just by putting the sound in the appropriate
directory and naming the file with the name of the creature.
* I went back and listened to every sound effect and several of them were
not very loud so I edited them and increased their volume to 188%. I kept
the original sounds in sc:OriginalUnmodifiedSounds/.
* BUG: Sometimes the digital sounds fail to play because they can't
get one of the audio channels. I believe this is because AlgoFreeChannel
was not doing a ADCMD_FREE before it closed the audio device.
Also sometimes the speech flips out and sounds on 2 channels at once.
ALLEGEDLY NOW FIXED. (hopefully this fixes the subsong problems too)
uhh... hmm... The only thing that has changed is that the algorythmic
sound effects now proceed MUCH faster than before.... They appear to be
at least 4x faster. Probably because it is freeing the channel before
the sound is complete.
I still get all the same weird audio bugs as before. :(
1. Play a test game with the speech OFF to see if that makes any difference.
It didn't make any difference that I could tell. Sometimes JCSound
couldn't allocate its channel just like always. :(
2. Play a test game with speech OFF and sound OFF. Still got the same
weird random bugs, possibly due to the fact that sound OFF only turns off
certain sounds while others still make noise.
2. Investigate FreeAlgoChannel()
3. Investigate reusing same struct IOaudio thing.
So either Speech routine is messed up or Algo sounds routine is messed up
or both!
Originally the audio device was only opened once and then it stayed open
for the whole game. Now it is opened and closed all the time.
So nowadays the first time we open it, we are using a zeroed out ioaudio
struct, and everytime thereafter we are using an ioaudio struct with stuff
in it.
AS AN EASY TEST, JUST MEMSET THE STRUCT TO 0 AND PLAY A TEST GAME THAT WAY
TO SEE IF THE BUG GOES AWAY! The bug is still there! Ack!
Simply add in a ADCMD_FINISH; Wait(); before the CloseDevice.
I did this and played a short test game. It only messed up once and that
is when I noticed the speech playing on 2 channels at once. However I
don't know if it messed up before or after the speech. I think it messed
up after the speech did. Did the speech mess up on its own? Or did it
mess up because the algosound messed up?
I played YET ANOTHER test game to see if it messes up with SPEECH OFF.
Ok the sounds NEVER messed up! YAY! So the only remaining sound effect
bug is in the speech system! I looked over the code and didn't see
anything obvious. I'm leaving this bug for SAI to fix. If he can't fix it
then I'll just rip out the narrator.device speech and replace everything
with digital speech.
* HACK FIX: In order to work around the sound channel problems caused by
our use of narrator.device, I have put some code into JCsound so that the
-2 option (play a mono sample on both left & right channels) will switch
down to playing it on _any_ channel it can get hold of if one of the
channels is unavailable. I played part of a test game and the sounds
seem to be working 100% now with this fix installed. But I'm sick now
and I only played several turns. ALLEGEDLY FIXED.
* BUG: Hippocrates randomly gained a combat point and it made him have 0
combat!!! Fix this by checking for negative combat and if so then -1 the
combat. Make sure it doesn't go below -max_combat. NOW FIXED.
* MODIFIED RANGE BOOST: so that if it is applied to a creature with
negative ranged combat, it will subtract 4 from his ranged combat; thus it
will heal 4 points more. It still adds 4 to the range as usual.
* BUG Grizzly Bear Combat sound is not working!!! NOW FIXED.
* BUG Kill files are not working!!! (Stone Giant didn't say "I kill you")
NOW FIXED.
Always REMEMBER to enclose filename in \" marks! So spaces in the name
won't mess it up! Maybe I should make this into a function?
* Read docs for narrator.device to see if it is ok to send in an
uninitialized struct when opening the device? Yes it is 100% ok to do
this. According to the RKRM: Opening the device sets the struct to all
default values.
* April 15th: Installed OS 3.1 ROM into JJ's A3000 computer. He now has a
full fledged OS 3.1 computer. I would have installed a web browser on it
so he could read the .html spell docs but he only has 4 megs of fastram.
* BUG: A computer wizard cast Vodka on the independents. Their combat was
halved like it was supposed to be... but it never said "Independents are
drunk with vodka" and the screen did not wave during their movement.
NOW FIXED.
=========================================================================
April 15th JJ bug report:
* BUG: Generators do not heal 7 intlligence like the stats say.
(Note from JC: Actually NONE of the generator's stats heal like they are
supposed to except for life.) NOW FIXED.
* BUG: Casting Inanimorphobiosis or StoneToFlesh on a ShadowWood doesn't
let you move it around and attack with it. NOW FIXED.
* BUG: He walked up next to a computer wizard and did not get engaged to him!
But that's ok because the wizard was inanimate and you are not supposed
to get engaged to inanimate objects. BUT this inanimate wizard was roaming
around killing things! So the real bug is:
* BUG: Inanimate Wizards can still move and attack.
I have 2 options for this:
A: Make it illegal to cast FleshToStone and MassPetrification on wizards.
B: Allow it to be legal and just fix it so that Inanimate wizards can no
longer move or attack. They will still be able to cast spells as usual.
And they can reanimate themselves by casting StoneToFlesh or
Inanimorphobiosis or Restoration on themselves.
I am choosing option B: for now. If for some reason this does not play
well then I can change to option A:
NOW FIXED.
* BUG: An Aerial Servant with max combat gets covered by a growth. You kill
the growth and it still has its max combat. Only the life is cut in half.
That is ok. But if a creature is under a growth for a long time, it eventually
gets all of its stats set back to their original values but with life cut
in half. This effect can cause massively awesome creatures to be reset
to their original lameness. This effect can also be used to heal poisoned
creatures.
--------------------------------------------------------------------------
Note from JC: the actual "bug" is that if a creature is covered by a growth
and the growth dies of natural causes then the creature's stats are reset
to their original values. However, this is not a bug but merely an
"Undiscovered Rule" :)
It can be interesting to intentionally allow your poisoned or wounded
creatures to be covered so that they can be healed.
If you want the creature to be returned to its original stats then you must
let it stay covered till the growth dies of natural causes.
If you do NOT want the creature to be returned to its original stats then
you must kill the piece of growth ASAP.
In either case, the life of the creature will be set to one half of its
normal maximum.
--------------------------------------------------------------------------
End of April 15th, JJ Bug Report.
===========================================================================
* PLAYED a test game where my wizard and the computer wizard were both
inanimate. It was very interesting and played quite well!
* BUG: Artifact Creature is covered by growth, growth dies of natural causes,
Artifact creature is no longer an artifact but a REAL creature. NOW FIXED.
* BUG: Red Dragon Scroll is covered by a growth, growth dies of natural causes,
Now the scroll is a REAL Red Dragon belonging to NOBODY! NOW FIXED.
* BUG: My wizard is inanimate. But I can still click on him. When I move
him he doesn't move but some sort of bizarre copy of him is made whose
animation is composed of a wizard image, a dead image of something and a
grey elf image. All its stats are 0, but its initial stats are all set to
those of a wizard, so its stats look like those of a dead wizard. Even
though it says its "Nothing. (Nobody)" NOW FIXED.
* BUG: My Inanimage is ONLY healing my adjacent wizard! It is somehow not
healing my Brown Bear and my Wood Elf. DOH! This is not a bug! The
description of the Inanimatologist clearly states that it only heals
adjacent inanimate objects. And since my wizard is inanimate in this game
he get's healed but my other creatures are not. EVERYTHING IS OK.
* OH GOOD GRIEF! OK Chaos is running and I'm online. I play chaos for a
while. I'm now in the spell-selection phase. I notice the modem lights
look strange and I go to check my email. Yam reports that I don't have a
TCP/IP stack running (The modem has just gone offline due to it being such
a long time since I did anything online). SOMEHOW this error window
freaked out the music in Chaos!!!! THIS SHOULD BE IMPOSSIBLE!!! The music
has allocated the sound channels at MAX_PRI!!!! Arrrgh!
Well at least I figured out the bug: The music system defaults to using
CIA timer chip #1. If it isn't available it uses CIA timer chip #2.
But Miami can ONLY use CIA timer chip #1! If it isn't available it just
tries to steal the use of it, thus screwing up anything that is using it!
So really this is a bug in Miami.
* Solution: Go online BEFORE starting Chaos. If you go offline for some
reason and you want to get back on just turn the music in Chaos off, then
get online, then you can turn it back on if you like.
If you forget about this and can't get online for some reason. Just turn
the music off and then you might be able to get online easily or Miami
may have already internally crashed.
AFAIK this problem only affects Miami, not other TCP/IP stacks.
* BUG: sm.c will not allow creatures with negative recovery. Thus my
newfangled Vampire won't work. NOW FIXED.
************************************************************************
COMPILE TIME REDUCTION: April 24, 2000
************************************************************************
On a reasonably badly-fragemented (not terrible or anything)
25Mhz 030 I did a complete recompile:
smake clean
smake
BEGIN: 3:17:42
END: 3:39:17
21 minutes and 35 seconds. The last 50 seconds were just doing
pool2tex <pool.txt >spells.tex
On a fresh reboot with no memory fragmentation on 25Mhz 030:
smake clean
smake
BEGIN: 4:17:47
END: 4:38:33
20 minutes 46 seconds. The last 45 seconds were just doing
pool2tex <pool.txt >spells.tex
I have now made a gst (Include:all.gst) by reading the docs in
sc:source/all.gst.
I have now modified the makefile to use the GST.
Now I will time a complete recompile using the GST.
BEGIN: 5:09:46
END: 5:22:27 with a Slink error 510: _GfxBase symbol - Near Reference to
data item not in near data section. First reference in cast.c to start.c
12 minutes 41 seconds + another 50 seconds for pool2tex = 13 minutes 31
seconds.
While on YAM+IRC with 3 open windows it took this long:
6:18:03
6:36:03 18 minutes!
Redo timing test with fresh computer and not on internet! No errors
BEGIN: 12:22:47
END: 12:36:18 13 minutes and 31 seconds.
If we subtract out the time that the spellmanager consumes in its
processing of files and the time that pool2tex burns (total of 2 minutes)
+ the 22 seconds spent printing warnings to the screen then using a GST has
doubled the compilation speed.
I could rewrite pool2tex and the spellmanager and save around 1.5 minutes
thus bringing the compile time down to only 12 minutes but I don't have
time for that right now.
If I then switched to using a 25Mhz 040 then the complete recompile time
should drop to about 4 minutes. Or if I bought a 66Mhz 060 then I could
get it down to 1.8 minutes.
************************************************************************
END COMPILE TIME REDUCTION: April 24, 2000
************************************************************************
* SOUND BUG PERSISTS! I just played a test game and sometimes the end of
turn sound randomly does not play when I press the end turn gadget!
ARRRRGGHH!!!
HORRIBLE BUG: Twice today when I was shooting something the game totally
freaked out and locked up. Well once it crashed the whole machine and the
other time it locked up. AFAIK this is related to the speech/sound
channel bug. The only way I know of to fix this is to remove the
computerized speech from the game permanently.
BUG: My ally cast Bless and the ChaosWavyTask triggered off
5 MuGuardianAngel hits: All are word reads:
42ed8, 42ecc, 42ed0, 42ed4, 42ed8.
MuGuardianAngelBug: Whenever there is a hit, MuGuardianAngel makes some
kind of beep that completely corrupts the sound system. It causes the
current sound effect or the very next one to run in an infinite loop.
Sending a ctrl-c to the JCsound task stops the infinite loop but the game
is still locked up. Pressing ctrl-c in cpr is useless.
Maybe this is actually caused by the "heavy cpu load bug" that I found
later on. A hit stops all tasks for around 1 second.
FACT: JCsound cli program works perfectly when I run it from the shell.
FACT: using JCsound from within Chaos via Execute("run ram:chaosdir/JCsound
filename -2 >nil:",0,0); causes random enforcer hits and crashes.
FACT: Many years ago I made a Star Trek game. It worked perfectly.
Then one day I put digital sound effects in the game using this exact
same technique. Only it was just some sound sample player program that
I had, I don't know where it came from. So it was coded by a totally
different person using totally different techniques. I called the cli
sound player program using the exact same Execute(); technique and from
that moment on the game started randomly crashing and locking up. I
never figured out what was going on with that. Now I think there is
just plain a bug in using Execute() with programs that use audio.device.
I JUST TESTED THIS CODE from within Chaos
FOR (t=0; t<40; t++) DO
Execute("run ram:ChaosDir/JCsound \"Sounds/Combat/Ghost\" -2 >nil:",0,0);
Delay(300);
NEXT // t++
It worked perfectly. No mungwall hits, no enforcer hits. Now I'm
back to thinking it is somehow a bug caused by some conflict between the
algorythmic sounds and the digital sounds. I tried it with a
Delay(100) and it still worked perfectly.
* I just set the priority of the narrator speaking to 127 (MAXIMUM) so that
nothing can steal its channel in the middle of it saying something.
Perhaps this will fix the speech bug?
Ok I just #ifdef'ed all the audio code out of the game. I turned off the
speech with the menu and played a test game. It worked for quite a while
but then the SAME old audio bug came back to haunt me! The 4th thing I
killed with my Ghost caused the JCsound to freak out and cause enforcer
hits then the whole computer crashed and reset! Why is that JCsound works
perfectly under test conditions but crashes randomly in the real game?
I think this must be related to cpu load now. I'll do more tests with the
CPU loaded up with stuff to do.
Ok I ran the above code loop test at Delay(100) with a gameboard that had
around 25 animated creatures on it. Everything worked perfectly.
So then I switched to ExplorationMode because that burns a lot more cpu
cycles and ran the test again. It was working and had played a few samples
then I clicked on my YAM icon (I had yam already running but it was
iconified). This used 100% cpu power for about 2 seconds while it sorted
through the 604 incoming messages in my mailbox. This caused 1 instance of
JCsound to "hang". So that now the loop is playing a sound sample then
failing, then playing then failing in an alternating pattern.
I believe this is caused by doing a Wait on a certain bit and then only
getting 1 message when in fact 2 or more messages may have already arrived.
* HACK FIX: I have set the priority of JCsound to run at 126.
Actually JCsound was ALWAYS supposed to have been running at priority of
126 or 127 since it barely uses any cpu time and it must run at a high
priority to ensure that there is no buffer underflow.
Now that I have set the high priority the above test works perfectly!
However there is still something fundamentally wrong with the
architecture of the JCsound cli command. And someday if some other running
task does a Forbid() for 1 or 2 seconds the bug will come back.
But at least the game should now run perfectly under "normal" conditions.
I played a test game with no algorythmic sounds and no speech and the VERY
FIRST digital sound effect (Combat/Ghost) crashed the machine!
I repeated the test under extra heavy cpu load. I was decompressing all
the jpegs in a directory. No bugs, no flaws.
So why does it work perfectly when I do it in the test loop but it crashes
so often when I play it as an attack sound during combat????????
Countless other tests producing various results ad nauseum...
* DOUBLE BUFFERING BUG FIGURED OUT!! First of all the entire bug is a
simple buffer underflow error. However I wasn't correctly handling the
incoming messages so JCsound could hang and never exit. I still haven't
figured out why it would crash.
* THE REASON why it was crashing after I had set its priority to 126 is
this:
1. I ran the JCsound program from the shell to test it. JCsound set
itself to pri 126, did its thing and exited. I had no idea that the CLI
inherits the priority of every program that you run in it! JCsound never
set its priority back down to 0 so the default priority of that CLI
became 126!
2. It worked great in the shell so I then ran Chaos from the CLI.
This means Chaos was running at priority 126! So this completely
nullified the effect of running JCsound at pri 126! JCsound was still
having to battle Chaos for cpu time!
Since the default buffers of JCsound are only 30k (a bit more than
1 second) the buffers were underflowing and messing up.
So anyway running Chaos from that CLI caused the JCsound program to
crash.
* JCSOUND ALL FIXED NOW!
DO A TEST:
FOR (t=0; t<40; t++) DO
SayCreatureName (0);
Execute("run ram:ChaosDir/JCsound \"Sounds/Combat/Ghost\" -2 >nil:",0,0);
Delay(11);
WaitJCsound();
NEXT // t++
IT WORKS PERFECTLY!!!
FOR (t=0; t<20; t++) DO
StartMod("Music/Mod.ChaosTheme42",5); // song 5 is ONLY the artifact changing music.
Delay(350);
endmod();
Delay(5);
Execute("run ram:ChaosDir/JCsound \"Sounds/Combat/Ghost\" -2 >nil:",0,0);
Delay(11);
WaitJCsound();
NEXT // t++
First 1 worked, second one failed! Finally a reproducable error!!!
Countless more tests and crashes later...
I can play a mod and then a sound sample.
But I can't play a subsong in a mod then a sound sample. It crashes the
machine. Something about playing subsongs is corrupting the audio.device.
Ok I modified the start routine so now at least it always starts playing
correctly. However, upon stopping the subsong, the next use of
audio.device still crashes.
I tested this with a stopmod() before the endmod(); It still crashes :(
StartMod("Music/Mod.ChaosTheme42",5); // song 5 is ONLY the artifact changing music.
Delay(350);
stopmod();
endmod();
Execute("run ram:ChaosDir/JCsound \"Sounds/Combat/Ghost\" -2 >nil:",0,0);
Delay(11);
WaitJCsound();
// This one crashes too! :(
StartMod("Music/Mod.ChaosTheme42",5); // song 5 is ONLY the artifact changing music.
Delay(350);
StartMod("Music/Mod.ChaosTheme42",0); // song 5 is ONLY the artifact changing music.
endmod();
Execute("run ram:ChaosDir/JCsound \"Sounds/Combat/Ghost\" -2 >nil:",0,0);
Delay(11);
WaitJCsound();
// This works!!!! (although there is a slight audio glitch at the end
// because it plays song 0 for 1/50th of a second before stopping the mod..)
StartMod("Music/Mod.ChaosTheme42",5); // song 5 is ONLY the artifact changing music.
Delay(350);
StartMod("Music/Mod.ChaosTheme42",0);
Delay(1);
endmod();
Execute("run ram:ChaosDir/JCsound \"Sounds/Combat/Ghost\" -2 >nil:",0,0);
Delay(11);
WaitJCsound();
// This crashes as usual.
StartMod("Music/Mod.ChaosTheme42",5); // song 5 is ONLY the artifact changing music.
Delay(350);
loadmod("Music/Mod.ChaosTheme42");
Delay(1);
endmod();
Execute("run ram:ChaosDir/JCsound \"Sounds/Combat/Ghost\" -2 >nil:",0,0);
Delay(11);
WaitJCsound();
// This doesn't crash but the volume stuff doesn't work on medmods.
StartMod("Music/Mod.ChaosTheme42",5); // song 5 is ONLY the artifact changing music.
Delay(350);
loadmod("Music/Mod.ChaosTheme42");
Delay(350);
mvolume=0; // All this volume control stuff has NO effect on medmods
playing=1; // because the medmod replayer code being used is not
playervolume(); // not set up to handle volume changes! :(
playing=0;
playmod(); // or plmod()
Delay(350);
endmod();
Execute("run ram:ChaosDir/JCsound \"Sounds/Combat/Ghost\" -2 >nil:",0,0);
Delay(11);
WaitJCsound();
Perhaps make a an empty pattern to jump to? Blah. To much trouble.
Then I can play song 0 but pattern jump to an empty pattern that makes no
noise. Blah. To much trouble.
I could simply StartMod("SomeStupidEmptyMod",0);
That mod could either do absolutely nohthing or it could play an instrument
on all 4 channels. But first it would set all 4 channels to volume 0!
April 28th: The AC compressor in my car broke. It was making loads of
smoke. Ack. I've only been driving the car for 3 months! I spent $1700
to buy it + $400 repairs (new brakes) the first day I drove it to work.
Now I can either get a rebuilt AC system for $853.10 with 3 month warranty
or a new one for $1153.79 with 1 year warranty.
The _only_ good thing about this is I had to miss work on the 29th, 30th
and 31st so I was able to spend all day fixing all Frédéric's bugs.
*************************************************************************
Fri, 28 Apr 2000 11:19:21 -0700 (PDT) Bug report from Frédéric
> Denotes the writing of Frédéric
The responses are written by me (James Conwell)
> * When an alliance is made, it should end at the end
> of the game, but actually it is valid again for the next game.
This is NOW FIXED.
I beleive that setup options should stay the same
from one game to the next unless you change them.
> * The giant spider is said to be poisonous IIRC, but
> it isn't.
I don't remember it ever saying that.
In the current version the spider is not poisonous
and it doesn't say it is poisonous.
> * You said in the readme that killing a generator
> would give 4 bonus spells,
> but I only got one (it was not a bipedal, aviary or
> dragon nest, but a full-blown generator).
Wow! Someone actually reads the readme! :) I think
you must be about the only person to do such a thing
:)
You only get _1_ spell. But you get to pick it from
a list of _4_ spells. This way your chances of
getting a REALLY good spell are greatly increased.
The only way to get to pick more than 1 bonus spell
is to earn more than 1 bonus spell in 1 turn. This
usually means you must kill more than one bonus
monster/thing in one turn.
There are other ways which I will leave for you
to discover :)
> * Abduction seems to be broken. It did work in v2.3d
> but it v2.5d the abducted creatures became independent.
I spent 20 minutes testing out Abduction and I found out that
Abduction was totally broken! It didn't "immediately become independent
again", it NEVER EVER changed the ownership of anyone ever!!!
(unless you were player 1 and you abducted cell 1... or if you were player
2 and abducted cell 2 etc.)
I always knew I hated the Abduction spell for some reason. Now I know why.
Because it didn't work!
I went back and checked v2.5 and v2.3 and the programming for Abduction
was identical so it appears to have had the exact same bug as v2.71.
> * (haven't tried yet with v2.5d) The turmoil spell
> was broken in v2.3d: the
> creatures were moved but somehow retained their old
> positions by some
> respects. And mounts were moved but not the wizards
> mounting them (which
> merely disappered and were still able to cast
> spells).
I wish you had reported this bug earlier! :)
Someone beat you to it and reported this very bug a
couple of weeks ago and I fixed it the next day.
Turmoil was broken from the day it was implemented until v2.81.
> * You say that Bahamut is unique but I've frequently
> (when playing with lots of scrolls) cast several platinum dragons.
Yes the description of the Platinum Dragon has always bothered me.
It has never been unique despite what the description said.
I've just been waiting for someone to complain about
it to give me an excuse to fix it. I have changed the description to
no longer say it is unique. NOW FIXED.
> * When using charm, you could convince scrolls to
> come on your side ! I can't imagine it's intended.
hehehehe this is hilarious!
After thinking about this a while I've decided to leave this the way it is
so that way Charm has an extra secret use when playing in Exploration Mode:
It can help you map out the level and show you where some of the scrolls are!
Ok, I admit that it makes no sense to be able to "Charm" a scroll... but
it does make the Charm spell more interesting.
We'll just leave it like it is until more people form opinions on this
matter. If anyone has an opinion on this matter please write me and let me
know.
It needs further testing in Exploration Mode.
> There are many other little things I don't remember
> at the moment but I'll note them down so I can tell you.
Yes please note down any bugs or discrepancies that
you find. I can't fix a bug if I don't know about it.
If you don't write them down immediately, you'll
forget them like I do :(
You should keep your Cygnus Ed Professional running
with a .txt file of possible bugs/weirdnesses/flaws.
> Anyway Chaos is really a great game, and
> I'd like to see an update!
> ----- Bug Report Part 2: -----
> Now the things I wrote down today:
>
> * There is no difference between the effects of the magic knife and the
> magic sword: both add 3 points of combat ability to the wizard and enable
> him to attack undeads. I think the magic knife should not add combat
> points, just be effective against undeads.
This has bothered me for years. I just never got around to changing it.
Today I have changed it so that Magic Knife gives only +2 combat and
Magic Sword still gives +3 combat.
Technically a Magic Knife should only give +1 combat and a Magic Dagger
should give +2 combat. But I was afraid people might confuse "Magic
Dagger" with "Poison Dagger" so I left the name of the spell as "Magic
Knife"
> * My gray elf is engaged to an earthquake ! I just cast "No grow" on that
> earthquake to which my gray elf was adjacent. It's like it's behaving like
> a creature, as someone just cast dark power on it ! :-) And another was
> just brain-drained. Somehow they are still growth because "no grow" can be
> cast a second time. But this attribute is not highlighted in the second
> info panel.
hehehe this all sounds hilarious! :)
There is also another problem: If there is a sea of growth and you cast No
Grow on a line of the growths to form a "wall" of non-growing growths then
nothing stops the other growing growths from growing over the nongrowing
growths. Doh! So I am changing No Grow to make the growth become inanimate
as well as making it lose the Growth attribute. Growths don't grow
over inanimate objects (except for the Earthquake) so now growths
cannot grow over the things you cast "No Grow" on. And you won't
get engaged to them now and you won't be able to cast Brain Drain or
Justice on them either. NOW FIXED.
* BUG: You can cast No Grow on something then cast No Grow on it again and
again. This is silly and wasteful and not what I intendended. NOW FIXED.
> * I think there should exist a counterpart to range boost: some sort of
> "range drain"... Currently (v2.5d), only invulnerability or reflector can
> save you from range combat. And it only applies to the wizard!
I already added in a Range Drain Beam spell back in v2.7. You need to
upgrade.
> * The only way to add recovery to some attributes like intelligence or
> agility seems to be the "touch of God" (or chaos lord :-) ). Why not add a
> feature like you did for magical resistance: e.g. add some intelligence
> recovery points if the brain boost is applied to a creature with max
> intelligence ? Same for agility, combat, range combat, maybe others ?
I will take this under consideration.
> * When playing with many scrolls, sometimes a "radioactive land" scroll
> appears. It has no description (empty screen) and any creature entering or
> shooting in that cell dies. But it's labelled as a scroll.
I fixed this today. Read below for more details.
> * I can remember one time (with v2.3d) someone had cast "eye for an eye".
> The manticore my wizard was riding killed a creature of that wizard, so it
> died. But my wizard hadn't reappeared ! It could cast spells but was nowhere
> on the board. I don't know if this bug is still there...
Well I played a test game just now on v2.81 and my Wizard was riding a
manticore and he killed the other wizard's manticore (which was being
ridden by him). We both had Eye for an Eye. Everything worked perfectly.
End Frédéric bug report.
**************************************************************************
* BUG: Computer creatures will NEVER move onto a Pit Scroll or a Radioactive
Land Scroll. NOW FIXED.
* BUG: Computer creatures will NEVER shoot a Pit Scroll or a Radioactive
Land Scroll. NOW FIXED.
* BUG: Any creature moving onto a Radioactive Land Scroll dies. NOW FIXED.
* BUG: Any creature moving onto a Pit Scroll dies. NOW FIXED.
* BUG: Any creature shooting a Radioactive Land scroll dies. NOW FIXED.
* BUG: Shooting a Pit Scroll says "Wasted Shot" and does not kill the
Scroll.
* BUG: When playing with Scrolls, sometimes a Radioactive Land Scroll
appears. But Radioactive Land isn't even a real spell that can be cast.
So I must either:
A) Never allow a Radioactive Land Scroll to appear in the first place.
B) Rewrite the Radioactive Land spell to be a "real" spell.
What should I do?
It is my belief that Sean intended that Radioactive Land should not be a
"real" spell so I will simply modify the scroll code to never generate one.
uhhh... what the hell.... There is already code to prevent spells of 0
probability being placed as scrolls.
* BUG: QueryProbability() is BROKEN! It has never worked! It always
returns the probability of the spell above it in the list!
NOW FIXED!
* BUG: SetProbability() is BROKEN! It has never worked! It always sets the
probability of the wrong spell! NOW FIXED!
* BUG: All saved game files have the wrong probability matrix saved in
them. I DID NOT FIX THIS. New games will be saving the numbers correctly.
The only reason spell probabilities were correctly displayed on the spell
information screen is because the code was hacked to say:
QueryProbabilty(spell-1);
Note to Sean: Please please please don't write any more functions that
require a real number - 1. Please make the functions require a real
number instead of a real number -1.
Please please please don't write any more arrays that require an index real
number -1. Please make the arrays require a real number instead of a real
number -1.
If this means not using the 0th element then that is totally ok.
The SpellProbability[] array is still off by 1. I only fixed the functions
to take a normal parameter. Rewriting the SpellProbabilty array to use
normal numbers requires rewriting various pieces of code that have lots of
+1 and -1 convolutions due to the array being set up wrong in the first
place. Leaving this for SAI to fix.
Now that I have fixed those probability functions, Radioactive Land Scrolls
and other 0 probability spells will not be showing up anymore!
???: I moved my Dire Wolf to within 3 squares of a Ghast and yet
my Dire Wolf did not smell him!! He was _exactly_ 3 squares away.
OK, this is because the Dire Wolf's smell requires line of sight and the
intervening unexplored squares block line-of-sight. So actually it is
technically working the way it is supposed to.
I could change it so that the Dire Wolf's sense of smell does not require
LOS. This would make it more realistic when there are empty unexplored
squares between the wolf and the other creature. But it would make it less
realistic if there were 2 solid walls between the wolf and the other
creature. This would be easy to do.
I could change it so that the Dire Wolf's sense of smell requires LOS but
the LOS checking could be changed to use what is REALLY in the cell. Thus it
would ignore empty unexplored cells. This would require real work...hmm...
If anyone has any opinions on this subject then please let me know.
* STUPID: The computer cast Combat on a Bolter Wall! NOW FIXED.
If the Bolter Wall was an inanimate object in the first place, none of
these Bolter Wall bugs that we've had over the years would have ever
happened.
* BUG: My dragon killed a wizard who just cast some trees. The game made the
death sound of a dragon for each tree that then collapsed. (8 times).
This is because I was using isDragon(id) instead of isIDdragon(id).
NOW FIXED.
* BUG: Mass Morph is broken! It _ONLY_ morphs generators!
I have changed it to morph all creations EXCEPT generators. NOW FIXED.
* FLAW: Casting Mass Morph on something belonging to Nobody results in all
empty cells being morphed into Magic Wood Trees. NOW FIXED.
* BUG: Sometimes the growths of dead wizards are growing all over the
board. Explanation: a wizard cast some trees on some fire and other
growths. When he dies all the visible board is put to sleep. Then the
trees explode, thus causing those growths to go back to the visible part
of the board. In this manner the growths owned by the dead wizard escape
being put to sleep or silently removed. NOW FIXED.
* NEW BEHAVIOR: I don't know if anyone ever noticed or not but it used to be
that when a wizard died, most of his buried creatures were silently removed.
I have now changed this so that they are merely put to sleep.
* COMPRESSION of Saved Games implemented using lha. From now on when you
save a game as "Blah" it is lha compressed into Blah.lha. Attempting to
load a .lha save file autodecompresses it. This saves about 70k per save
file.
Before Compression : After Compression
JamesConwellLevels: 222556 9573
SAI_Levels: 667618 29236
Total: 890714 38809
SAVED 851K!!!!!!
Tuesday May 16th, 2000
I've been ripped off at my job each day for several days now. I have been
extremely stressed out for over 1 week now and have done almost nothing.
Today I talked to an attorney and I finally calmed down enough to be able
to do some coding:
* AUTOSAVE FEATURE IMPLEMENTED: This feature defaults to ON. It will save
the game automatically on EACH human wizard's turn. Each save is done into
a different filename. Example filename "004p8AutoSave.lha". This means
that this is the savefile for turn 004, player 8's turn. The turn number
is first so that the files will list in numerical order in the
filerequester.
From now on if you find a horrible bug that crashes the machine or
something you can ALWAYS go back to your last saved position (Because it is
saved automatically). You can then replay the turn over and over again
to figure out exactly what it is that is triggering the bug. This should
greatly benefit playtesters the world over.
* IMPLEMENTED all of Frédéric's spell-description corrections/clarifications
for all spells beginning with the letters A-E.
===========================================================================
* BUG: Disrupt drains the intelligence of creatures which are your allies.
NOW FIXED.
This seems like a good time to vote on the Disrupt spell:
This spell causes a momentary lapse of vision in all enemy
creatures. It can prove fatal to weak minded creatures and causes permanent
damage to the cerebral cortex of those that survive. This spell currently
does not affect wizards, growths, inanimate objects or scrolls.
Frédéric has proposed that Disrupt should be changed to affect
wizards. Do you have an opinion on this?
You can vote for, against, or no opinion. Or whatever you want 8)
New Zealand makes this statement:
My general opinion is that it should be difficult to kill wizards
with "at a distance" type spells. I know there are other execeptions
to this already, e.g. curse.
However, since the disrupt spell is relatively rare, I don't see a
problem with making the change. It is definitely best to have it
not affect growths, since otherwise it would kill most of them.
Hungary has this to say:
After I've searched what does it mean the "cerebral cortex" expression, my
opinion is the follow:
If it is the same like brain drain, but it has effect on the whole playing
area, I say: OK, let it has affect on the wizards and all object (all means
EVERYTHING). Let's rise up the CHAOS!!!!
JC replies:
Since the description says it affects the cerebral cortex it should only
affect creatures. Inanimate objects and growths do not have a cerebral
cortex. Technically this spell should not affect the Robot, but that is
an issue for another time 8)
I feel that since the spell does not require line of sight and since it
already affects huge numbers of enemies I am mostly against applying its
damage to wizards.
If you are playing a game against 7 enemy wizards and each wizard has 4
creatures on the board then casting Disrupt will damage 28 enemy creatures!
Isn't that enough?
Also you don't have to pick a particular enemy to damage. It just damages
ALL enemy creatures. Therefore I am mostly against the proposal.
However, since the spell only does 2 points of damage to intelligence
combined with the fact that it is very rare, I'm not totally against it.
Thus I vote -.75 points.
France votes FOR this proposal: +1.0 point
New Zealand votes Neutral/For this proposal: +0.5 points
Ireland abstains: 0.0 points
USA votes +1, -.75 +0.25 points
-------------------------------------------------------------
TOTAL: +1.75 points
Proposal Passes and is implemented on May 20th, 2000
==========================================================================
* Created a MakeDemoOfChaos.txt AmigaDos script file to copy all the files
needed to create a playable Chaos distribution into a Chaos/ dir.
I actually used this to make a registered version of Chaos 2.81. DONE.
Version 2.81 installed on JJ's computer on Monday, May 22nd, 2000.
END OF VERSION 2.81
BEGIN VERSION 2.82 International Language Version.
* IMPLEMENTED all of Frédéric's spell-description corrections/clarifications
for all spells beginning with the letters F to Z. Including complete
rewrites of Magic Attack, Magic Bolt, Ice Breath, Lightning, X-Ray and
Fireball. DONE.
* CHANGED Pythons so they attack Life Force + Manuverability.
* ADDED a new "Language" menu option with English, Français, Hungarian,
Deutsch, Español and Italiano options. All options are mutually
exclusive.
* BUG: Hold down the RMB. Now select any language then select another
language (DO NOT RELEASE THE RMB DURING THIS TIME). The 2nd language you
selected will be correctly highlighted and the 1st language will be
correctly unhighlighted. But internally the program still only knows that
you selected the 1st language, thus the Language variable is now set to the
WRONG value! Ok, after some hours studying the RKRMs I worked out how
to handle multiple selections in 1 MenuHandler() call. NOW FIXED.
* Above fix has hopefully now prevented numerous other Menu problems from
ever happening.
* ADDED some text to print when a promotion happens.
* ADDED some text to print when an Orc/Goblin/Troll gets a bow.
* ADDED some text to print when the game is AutoSaving.
-------------------------------------------------------------------
JJ complaints on May 25th, 2000:
1: Range Boost didn't work on his Wizard with a Magic Bow. NOW FIXED.
2: He doesn't like the digital sound effects and wants a "Combat Sounds"
on/off feature. This took me 2 hours. 1 hour to do it and and 1 hour
to debug it due to lame C STUPIDITY. I wrote IF (MENUCombatSound)
and the compiler generated NO ERRORS! But there is no variable called
MENUCombatSound!!!!! And it didn't call the FUNCTION
MENUCombatSound() either! It just always evaluated the nonexistent
variable as TRUE so the sounds were ALWAYS ON no matter what I did.
NOW FIXED.
3: The graphics on the info panels on his A3000 are in different
proportions to the graphics on the main screen. He doesn't like this.
This is due to limitations of the A3000 graphics chips, sorry.
You can either:
A) Redesign all 1000 graphics in the game by doubling their size
vertically and then hand editing them to smooth out the resulting
blockiness. Assuming you can edit 5 graphics per hour this should
take only 200 hours.
B) Buy an Amiga 4000 or a suped-up Amiga 1200.
-------------------------------------------------------------------
* INTERNATIONAL LANGUAGE SUPPORT ADDED! (Only for Spell Descriptions)
IT WORKS GREAT! Currently the only languages supported are English,
Français and Hungarian. The font still needs to be edited to contain
accented characters, this is Frédéric's department.
* ELIMINATED all those stupid spell+1 and spell-- and spell+=1 constructs
from SpellInformation(). This was all caused by PoolPos requiring a
spellnumber-1 instead of a real spellnumber! NOW ALL FIXED!
* ENFORCER HIT BUG! Selecting "Scores" from the Menu somehow corrupts the
value of the Global Variable "Language" and sets it to 8. Then anything
that uses the Language variable to access an array triggers off enforcer
hits. Hmmm... this was all caused by a missing break; after a
END_SWITCH. I guess most END_SWITCH statements need a break; after them.
* Wolverines now scavenge +3.
* Achiyalabopa now needs LOS for its sight range due to the fact that it is
"low-flying".
* Wednesday, May 31st, 2000: Installed version 2.82 onto JJ's computer.
My optical drive got tons of write-errors and it was a major problem to
copy the game onto it. I don't know what I will do for the next version
:(
BEGIN version 2.83: Continuation of International Language Version.
* Hidden Horror + Reincarnation Bug Report by Frédéric:
I had cast reincarnation on my hidden horror so as to get a golden dragon
when it came close to that combat-enhanced enemy wizard (like this is said
in the hidden horror description), but I only got a red dragon.
NOW FIXED.
* Added in some code to read in all the catalog files.
To preserve file attributes on extracted lzx files type the following:
lzx -a x filename
lzx -a x filename dirname
* REPLACED most of the text in the game with an appropriate call to
Message() which gives the correctly translated string according to the
currently selected language.
* PROOFREAD, corrected & edited Frédéric's new doc sections on creature
statistics and spell statistics.
=========================================================================
Begin Catalog Translation Problems
=========================================================================
Ok now I've had some serious problems over the last few days.
#1: French grammar is backwards when compared with English grammar so my
catalogs are useles. But the solution is VERY easy, simply make use of the
new sprintf() (or related) routine in the Amiga OS that allows the
translator to switch the orders of the parameters around using positional
notation such as %1$s %2$s %3$ld.
#2: Well great, the only way I can figure out to use the new sprintf
in Amiga.Lib instead of the SASC sprintf is to link with Amiga.lib first.
But this is TOTALLY unacceptable because then the Amiga.lib printf would
replace the SASC printf and the amiga.lib version is totally bugged and
lame and worthless.
#3: Amiga.lib sprintf doesn't support many of the features of "real"
sprintf routines in C compilers. For example it doesn't have floating
point support. :(
#4: Amiga.lib sprintf is lame and expects 16-bit ints. Ack. So all %d and
%c must be changed to %ld and %lc to compensate for this.
SOLUTION:
#1: We will have to continue to use the SASC sprintf for floating point
formatting and possibly other types of formatting. The sprintf statements
using floating point will have to be broken apart into multiple steps.
Fortunately there is only 1 place in the game that uses a floating point
number in a translation string. So this will be dead easy. The other
floating point uses of sprintf are purely numerical and will not be
translated in a catalog file.
#2: I will implement a new JCsprintf routine which uses the totally cool
positional notation of AmigaOS RawDoFmt() and amiga.lib sprintf, etc. I
thought about calling it Sprintf but I figure we might get them mixed up, I
couldn't really decide what to do about this... Maybe we should call it
Tsprintf since it is only required for use with strings which are being
translated from 1 language to another.
#3: This new Tsprintf routine is simply an asm routine that calls
RawDoFmt() with a function parameter to store the chars in a buffer. WHY
OH WHY doesn't RawDoFmt() default to sprintf string-storing when supplied
with a NULL function parameter?
This asm routine came straight out of the RKRM example listed under
RawDoFmt()
This should solve all the _current_ translation problems. Other
translation problems will be dealt with later.
* I went through and added numeric positioning information to EVERY string
that had more than 1 parameter.
* I basically copied the prototype from sprintf() in stdio.h to use as the
prototype for Tsprintf(). Though first I compiled the game as a test
with no prototype for Tsprintf() and no warnings or errors were generated!
I assumed the game would just crash so I didn't try to play it like that
till added the prototype and did smake clean smake.
=========================================================================
End Catalog Translation Problems
=========================================================================
--------------------------------------------------------------------
Begin Handling Translated Spellnames
--------------------------------------------------------------------
Decide how to handle spellnames? Why not handle it exactly the same as I
handle Message(); ? Yes, exactly like I handle Message, excellent.
Ok, but how do I read them in?
If I could somehow make a list of all English spellnames. This is easy
duh. I have a list of all English spellnames. Its built into the game!
creature_name[]!!!!!!
IF (the date of the directory "SpellDescriptions/English" > the date of SpellDescriptions/EnglishSpellnames.txt) THEN
just do "list SpellDescriptions/English/ quick files nohead >SpellDescriptions/EnglishSpellnames.txt"
I now have a .txt file of all English spellnames.
END_IF // ALL DONE NOW. I just copied code from handling the sound effects.
Above paragraph is all useless! I need French names of OBJECTS in the game,
not french names of english names.
Now go through each name in the this list and open up
that filename in each language/ dir and dig out the language/ version
of it and put it into an array! Easy! DONE.
* Make a CreatureName() macro that returns the creature_name of the
creature in the currently selected language. DONE.
* Go through the entire game and replace all appropriate occurrences of
creature_name[x] with CreatureName(x) except the ones in editor.c.
I'll worry about that later. Certain occurrences of creature_name[x]
specifically must NOT be replaced because they are dealing with files
(sound files, text files, etc.) and those files must always be named
according to their english name. DONE.
Check the date of the LanguageSpellnames.txt against the date of the
dir Language/ If the dir is newer then it means something has changed and
the text files must be rebuilt. So if the Language/ dir is newer than the
LanguageSpellnames.txt file or the EnglishSpellnames.txt file or the
English/ dir then it must be rebuilt. Additionally, if the English .txt
file gets rebuilt then they must ALL get rebuilt because it might mean
some new spells have been added.
So in the end I'll end up
with a 350 line FrançaisSpellnames.txt
and a 350 line MagyarSpellnames.txt
etc.
Line 1 is the translated name of object 1.
Line 2 is the translated name of object 2.
etc.
* PROBLEM: It takes several seconds to open/read/close the 350 files
required to read in the translated spellnames. (And its only doing Français
now! That will be over a whole minute when all languages are done.)
So I optimized it such that the list only needs to be rebuilt if someone
has changed something in one of the descriptions. NOW FIXED.
* TRANSLATED SPELLNAMES ARE NOW FULLY FUNCTIONAL.
--------------------------------------------------------------------
End Handling Translated Spellnames
--------------------------------------------------------------------
* Changed "Hungarian" -> "Magyar".
----------------------------------------------------------------------
Email from Frédéric
----------------------------------------------------------------------
Too bad my stupid screen grabber overwrote the screen grab I made earlier,
it was very impressive ! I played with 30 scrolls and my wizard appeared
next to a fir with combat on his spell list. With the help of a stone giant
I destroyed the tree and it revealed a Chaos lord spell !! I cast it then
replicated (with triple active) myself. I destroyed 4 generetors and 2 enemy
wizards in only one turn :-) !! I had to pick 6 spells among a big list, and
there was 1 Generator and 2 touch of God spells in it ! I was awesomely
powerful.
Then I made a stupid mistake. One of my replicates got burried by an orange
jelly. I rescued him but forgot he was only at half of his _initial_
strength. He got killed by a stone golem next turn. And it was my main
wizard so I lost.
One thing I don't understand is how it is decided which wizard is the
casting wizard. It seems to change each turn. Is it random ?
Reply from JC: The spell description warns that casting Replicate on one's
own self can be very disorienting. It means what it says. 8)
----------------------------------------------------------------------
End Email from Frédéric
----------------------------------------------------------------------
* June 13th, 2000: Received Patrick's 2nd registration from Ireland. YAHOO!
Compiled v2.83 and Emailed it to him on June 15th, 2000.
The actual size is about 8.18 megs.
The .lha archive size is about 5 megs and
the email size is about 6.6 megs.
* June 17, 2000: Received Frédéric's registration. He is now inducted as a
junior member of Team Chaos and assumes all privileges and
resposonsibilities associated therewith.
He is also Chief Executive Vice President in Charge of Français
Translation, Français Font Editing and also English and Français
AmigaGuide Electronic Hypertext Documentation.
Saturday, June 17th, 2000: I loaded my very first IFF graphic file into the
game and displayed it. AMAZING! All these years I've never once loaded a
graphics file into one of my programs! Though I have loaded IFF _sound_
files for many many years.
**********************************************************************
Bug Reports from Frédéric:
**********************************************************************
* Saving does not work ! I launched Chaos from the shell and got
messages like
c/lha: unknown option - 3
each time the game tried to save the current game (either autosave or
requested save).
I've finally found why lha complains about the -3 option: it was in my
ENV:LHAOPTS file, to automatically select the best compression algorythm.
However, the old lha version supplied with chaos does not know of this
option. The ideal solution would be that you use the -I option when you
call lha from Chaos, this will cause lha to ignore the LHAOPTS environment
variable.
JC: Ok, I changed lha to use -qaI when being called from Chaos. NOW FIXED.
JC>> * I tried to reactivate the lhaopts environment variable but the
JC>> problem about -3 option arose again. Maybe you should put the -I
JC>> option before all other options and alone on its dash.
JC> Please try using the lha that is in chaos/c/ and figure out how to make
JC> it work.
JC> Just type it from the shell and try different options and settings
JC> until it works properly. Then let me know which combination of things
JC> worked and I'll put it in the program.
When I say "c/lha" I get "invalid option -3".
When I say "c/lha -I" I have the usage summary.
I said "c/lha -Ir a ram:ChaosTest.lha AmigaToPAL" and it worked.
I think the problem is that you mixed options and commands. -Iq are options,
a is a command "add", not to be mixed with the -a option (preserve file
attributes). So the following will work:
c/lha -qaI a xxxAutosave.lha ChaosSavedGame
(at least it should). Drat ! I tested it and it doesn't :-(
Okay, when I move -q aside it works:
c/lha -aI -q a xxxAutosave.lha ChaosSavedGame
JC: Ok I have now implemented the above line into the autosave code of the
game. It doesn't work! Lha keeps warning me that the "I" option must
appear immediately after a - and before the archive name!
c/lha -I -aq a xxxAutosave.lha ChaosSavedGame
NOW FIXED.
* I cast abduction and it abducted a poison dagger scroll ! And it did
reveal itself as I was trying exploration mode :-)
JC: NOW FIXED
* The proportionnal font you use in the info screens does not know of
accented letters !! This makes french descriptions for spells totally
unreadable ! For example "Dévastation" becomes "Dvastation" !
JC: I know all about this. You are in charge of translation so you are
supposed to fix this.
NOW FIXED.
* The special combat ability provided by Aesculapius does not target
anything ! I think special combat should have a default stat target even if
the creature has no special combat at all (like range combat). Moreover
this special combat targets my own creatures too !
JC: This was a simple problem of not enclosing my #define in ()
NOW FIXED. Aesculapius no longer gives people Special Combat.
* "Independent vulture eats some brown bear cadaver. Life +d"
Seems the %d thing does not work.
JC: This is a problem with that stupid OS sprintf not working with long
parameters. It only works with words! It has already caused me many many
problems and this is the whole reason why it took me soooo long to do the
translation coding. Anyway this particular sentence is NOW FIXED.
* I got this error message too:
ChaosDigitalSoundSubProcess : erreur code 150
JC: You can ignore this one. All it means is that Chaos tried to play a
sound effect when there were no channels available (like when the music was
playing). If music had been off at that moment, the sound would have
played. The actual error message is generated by the OS and there is no way
for me to suppress it.
* I've found another minor bug: when I cast alternography and restart the
game, the alternography is not reset and remains active.
JC: NOW FIXED
* "Asleep's wizard munches on some manticore's cadaver. Life +d." Asleep's
wizard ??? This should not exist (it is not a fake wizard)! Moreover, asleep
creatures should not eat anymore !
JC: Well, there was a bug whereby any scavenger that was asleep or dead or
a scroll would still scavenge any dead bodies that it was on top of.
NOW FIXED.
--------------------------------------------------------------------------
* Providing someone with a telescope does not increase his mapping of his
own position in the world until he moves. Too bad if that creature is
engaged. Maybe the telescope spell should update the explored cell for the
recipient creature. This update should also happen when a creature blocking
line of sight moves, revealing some parts of the world. Maybe a good place
to do this is board update.
Reply from JC:
#1: Its a rule: if you are engaged then you can't map the world. You are
too busy defending yourself to have time to draw maps.
#2: Furthermore its a rule that if your creature doesn't move then it
doesn't map anything. Thus, a creature that never moves will never map
anything.
#3: I have been thinking of changing the Telescope and Seismology spells
such that they give results immediately upon casting. Since you asked for
this I went ahead and implemented it.
So from now on if you cast Telescope or Seismology you will IMMEDIATELY (in
the casting phase) map new areas.
--------------------------------------------------------------------------
**********************************************************************
End Bug Reports from Frédéric. (Is there ever an end? 8)
**********************************************************************
* FIXED description of Solar.
* CHANGED: Aesculapius scrolls are now always buried.
* CHANGED: Touch of God, Chaos Lord, Iridium Horse and Aesculapius scrolls
are now only 1/3 as probable as other scrolls.
* END of Version 2.83
* BEGIN Version 2.84
* CHANGED Cartography to immediately explore the cells during the casting
phase in the same way that I already changed Telescope and Seismology.
* INSTALLED the new ChaosCalligraphy.font which has been modified by
Frédéric to include (all?) international characters of Western European
alphabets. Most notably ¿¡ñÑ éèêëæ ÉÈÊËÆ çÇ etc.
**********************************************************************
Bug Reports from Frédéric:
**********************************************************************
> * I cast betrayal on a bolter wall and it said the spell succeeded. But the
> bolter wall still belonged to the same player.
JC: This has always been possible. If Betrayal succeeds then a new player
is randomly chosen. In your case it randomly chose the same player as
before.
I have now changed it so that if the spell succeeds then the target
_WILL_ change owners. NOW FIXED.
> * Sometimes the old EndOfTurn sound is played at the end of a turn, instead
> of the sound from file "EndTurn.8svx". I did not find a condition for this
> to happen.
JC: This happened only when someone had previously cast Move It.
NOW FIXED.
* When I begin a game in exploration mode (as player 1 or 8, never mind),
the position of player 3 is shown to me before disappearing again. ?
JC: This one took me a while to figure out. In the beginning of the game I
changed the PlayerView to 15 so that way absolutely nothing would be shown
since there is no player 15. But the Team[] only has 12 elements! (0-11)
so Team[15] was actually accessing into TeamSettings[3] (which keeps a
backup copy of the team settings so that alliances and seperations don't
mess up the setup screen) Of course TeamSettings[3] is going to equal 3
unless you change the Teams on the setup screen. So the game thought that
player 15 was on Team 3 and thus would show you player 3's position at the
start of the game.
So how do I fix this?
A: Expand the Team[] and TeamSettings[] array.
This requires a change to the savegame format and I would have to
convert all the old levels to the new format.
B: I could just not change the view to be 15 at the beginning. I could
change it to the 1st human player, (since he will get the 1st real
view anyway) or I could change it to the DEADP player.
Option B is easiest. I will just change the view to the DEADP player.
This will work perfectly until the game starts randomly distributing dead
bodies across the map at the beginning of the game. This will probably
never happen so it should never be an issue. NOW FIXED
> * A question about something I wanted to test but I didn't have the right
> spells on my list. What does an inanimate object becomes when it has been
> hit by stone to flesh and reincarnate, and then dies ? Does the
> reincarnation scheme take this into account ?
JC: I tried this and it worked. It said R=0 meaning that it doesn't
reincarnate into anything. I then killed it and it died as usual. Nothing
messed up, no crashes, my computer is still running. 8)
> * I cast the cat lord, and I had already a lion. I was able to control the
> lion and attack a harpy with it. Then, after I clicked end-of-turn, the cat
> lord controlled the lion and attacked the harpy again.
NOW FIXED.
> * My wizard has scavenge +4 but does not scavenge the harpy cadaver he's
> standing on (autosave 020p8). Ah ! I see. Scavengerism is only for
> creatures with a life force below its initial value, right ?
Correct.
> * Another wizard has scavengerism and it works. But he's cloaked and the
> sentence say he is a wizard munching on some brown bear carcass. I think it
> should say "cloaked creature" instead of wizard.
NOW FIXED.
> * A leopard corpse mewed when it was destroyed by a fireball ! Corpses
> really shouldn't make any sound :-)
NOW FIXED.
> * I'm able to control the solar and make it attack before it attacks on his
> own !
NOW FIXED.
========================================================================
BEGIN HORRIBLE LOCKUP BUG WITH "Repulsion" sound.
========================================================================
* Sometimes the game locks up and makes the Repulsion sound.
JC: This same bug was reported by JJ several times over the last few months
but the details were so sketchy that I had no way to track it down and
fix it.
10 days later after countless hours of playtesting by Frédéric using
the JC modified version of Chaos which generates logfiles of its
actions, I was _finally_ able to track down this horrible bug!!
// Begin code copied from CellEffect();
case TELEPORTIN:
ObtainSemaphore (&BoardLock);
FOR (i = 0; i < 8; i++) DO
IF (i != 7) THEN
SetAPen (rastPort, WHITE);
Move (rastPort, x + i, y + i);
IF (DrawIt) Draw (rastPort, x + CellWidth - i, y + i);
AUDIONote (2000 - i * 100);
IF (DrawIt) Draw (rastPort, x + CellWidth - i, y + CellHeight - i);
AUDIONote (1000 + i * 100);
IF (DrawIt) Draw (rastPort, x + i, y + CellHeight - i);
AUDIONote (2000 - i * 100);
IF (DrawIt) Draw (rastPort, x + i, y + i);
AUDIONote (1000 + i * 100);
END_IF
IF (i != 0) THEN
SetAPen (rastPort, BLACK);
Move (rastPort, x + --i, y + i);
IF (DrawIt) Draw (rastPort, x + CellWidth - i, y + i);
IF (DrawIt) Draw (rastPort, x + CellWidth - i, y + CellHeight - i);
IF (DrawIt) Draw (rastPort, x + i, y + CellHeight - i);
IF (DrawIt) Draw (rastPort, x + i, y + i++);
END_IF
NEXT // i++
ReleaseSemaphore (&BoardLock);
break;
// End code copied from CellEffect();
Notice that it always decrements i (i--) but it only SOMETIMES
reincrements it (i++)
As i happens to be the loop control variable, decrementing it once per loop
= an infinite loop!
I spent hours looking through the code for constructs like this!!!!
I SPECIFICALLY looked for ANY FOR NEXT loops in which the loop control
variable was changed via i++, i--, --i, ++i, or i+=x or i-=x. But I didn't
look in cell.c because I thought the problem was either in chaos.c where
the recovery code is or in core.c where tons of low-level routines are at
that get called millions of times by chaos.c.
NOW FIXED.
What the actual bug was:
Basic Explanation: Anything that caused the TELEPORTIN or TELEPORTOUT cell
effects to be used would lock up in an infinite loop making sound. Since a
simple sound played in a loop is what the "Repulsion" sound is, this sounds
very similar to the Repulsion spell sound.
Specific Explanation:
IF you were playing in exploration mode and any of the following things
happened then the game would lock up.
A) A roper teleported to a new location.
B) A creature changed sides due to impurities.
C) Any Wizard used the Passage spell.
D) Any Wizard used the Teleport spell.
E) Any wizard cast Pyrotechnics or Storm and it actually hit a creature.
F) Any Haunt spontaneously changed sides.
G) Any Wizard cast the Pox spell on something.
NOW FIXED!!!
So the reason the lockup bug seemed to only happen when you played with
lots of enemy wizards and with growths on the screen was because, the more
stuff on the board, the more of a chance of Impurities causing an alleigance
change.
========================================================================
END HORRIBLE LOCKUP BUG WITH "Repulsion" sound.
========================================================================
* BUG: When I'm in alliance with another wizard, I can see the regions he
has explored. However, when a creature is moving in these regions, it
is not highlighted.
JC: This bug was a simple typographical error in the code. NOW FIXED.
> * About the bug in inamorphobiosis you fixed. I thought the same problem
> could arise when a wizard mounts a cat (lion, jaguar etc) thanks to "Mount"
> and another player casts the cat lord. Did you consider this case ?
JC: I just changed it so that Cat Lords cannot take control of mounted cats.
NOW FIXED.
> * After Joker, I got "Wizard 7" on my list ! Is this normal ?
JC: Well, the way Sean programmed it, it could give you any spell, even spells
with 0 probability. I have now changed it so that it will not give you
spells of 0 probability. NOW FIXED.
You also reported months ago that you were able to get a Radioactive Land
spell on your list by casting Joker in v2.5. This was a symptom of the
exact same bug and is also NOW FIXED.
> * I had triple in effect and my marid cast violet fungi. It logically cast
> it three times, but all at the same place, one on another. This should be
> considered stupid !
JC: NOW FIXED.
> * I first got Burstroem's Browser today. I cast it and began to peek at
> other wizards spell lists. When I play with Texas Trash'em, I can peek at
> others spell list when I have already picked a spell to cast and the game
> is waiting for me to discard another one. However, when I get back to my
> list, the spell I had picked to cast is displayed again.
JC: NOW FIXED.
> * When a growth is hit with "No grow", it becomes inanimate, so the
> animation should be stopped.
JC: NOW FIXED.
**********************************************************************
End Bug Reports from Frédéric. (Is there ever an end? 8)
**********************************************************************
* CHANGED: Each Wizard now has a unique name! Instead of 8 creatures with
the name "Wizard", we now have "Wizard 1", "Wizard 2" etc. This was
neccessary so that each wizard can have its own unique sound files and
graphic files.
* BUG: A scroll of a Cat Lord takes control of the cats and makes them
belong to NOBODY! NOW FIXED.
* CHANGED: Inanimage is now only half as likely to cast Inanimorphobiosis
or Mass Petrification as he is likely to cast any of his other spells.
Sent new version of 2.84 to Frédéric for playtesting on July 5, 2000.
* CHANGED Ghoul: The description of the Ghoul says that it feeds on others
so I have now changed it so that it has Exophagy and +2 Scavenging as per
Frédéric's request.
**********************************************************************
Double-Attacking Bug Reports from Frédéric:
**********************************************************************
>>> * A floating eye belonging to one of my computer allies was hit by
>>> singular earthbind. It moved close to an enemy and attacked it... two
>>> times !
> * The ghoul in cell (3,3) attacked the independent generator twice !!! This
> is the first time I see this ! Autosaves 27 and 28. It did it again on turn
> 28 !
> * Another ghoul, in the upperright corner, attacked the adjacent ogre
> assassin twice ! Autosaves 39 and 40. It just killed the ogre now and got
> back to its original place. So it really gets two chances to move!
Yes quite right. Any nonengaged computer-controlled creature with >10
movement points could move twice! NOW FIXED.
**********************************************************************
End Double-Attacking Bug Reports from Frédéric.
**********************************************************************
* BUG: Independent creatures and the creatures of computer-controlled
wizards get to move and/or attack twice if they have more than 10
movement points and are not engaged. NOW FIXED.
* BUG: Independent creatures and the creatures of computer-controlled
wizards accrue approximately .24 free movement points for each diagonal
movement made. NOW FIXED.
* BUG: A computer-controlled wizard who is mounted on an inanimate object
(such as a centaur that has been hit with Flesh to Stone) can still
attack and shoot if the centaur is "engaged". NOW FIXED
* BUG: Animate affects scrolls of inanimate objects! NOW FIXED!
**********************************************************************
Bug Reports from Frédéric.
**********************************************************************
> * I cast "no grow" on my own gooey blob so that I get many creatures when I
> subsequently cast "animate". However, it didn't work: I still have my
> petrified gooey blob. We should either: say the spell only works for trees,
> or make it affect more inanimate objects (including those petrified by
> flesh to stone, for example make them creatures again).
JC: I changed it so that now Animate affects petrified growths. NOW FIXED.
Also it didn't affect Ropers. Now it does.
> * When the mount of a wizard is killed, it leaves no corpse behind.
JC: NOW FIXED.
> * When a creature kills a growth covering a scroll, it does not move over
> the scroll.
JC: NOW FIXED.
> * Desire: on the second setup screen, add the GFLG_TABCYCLE (cf
> Intuition/Intuition.h) to the string gadgets so that one can move between
> all the string gadgets without using the mouse.
JC: DONE. I also implemented it on the 1st setup screen.
TABCYCLE feature added in honor of Frédéric Delacroix, who earned the
"Playtester of the Month Award" for June 2000.
> * Suggestion: Convert could be cast on the inanimate so that it can be used
> to destroy dark wood. (An enemy of mine is an arborist and cast a line of
> dark woods close to me).
JC: DONE.
Convert spell description updated.
> * There is an independent solar but it never moves or attack !
JC: NOW FIXED. Tested and works perfectly.
**********************************************************************
End Bug Reports from Frédéric. (Is there ever an end? 8)
**********************************************************************
----------------------------------------------------------------------
- Begin Font Bugs!
----------------------------------------------------------------------
Font in start/quit gadgets is wrong. It is using a system default font.
Font in Menus is wrong. It is using a system default font.
Font inside the filerequester is wrong. It is using a system default font.
Font in text gadgets on setup 1 is Topaz!
If the system default font is really HUGE, as it might be on an Amiga with
a 1600x1280 gfx card, then the gadgets are really messed up and the menus
look HORRIBLE and the menus corrupt the screen gfx. The gadgets and menus
are programmed to ask for an 8 point font and they expect to get it. If
the font is not 8 points then bad things can happen.
Ok I just added the following line to the OpenScreenTagList() of the main
screen:
SA_Font,&PearlFont8textAttr,
THIS DID NOT FIX THE BUG!
I have now tried multiple other ideas. None of them had any effect
whatsoever. :(
I conducted various experiments and had no luck whatsoever. So then I
spend the rest of the day discussing this problem with various Amiga
Programmers and _FINALLY_ Drad figured out the problem and conducted some
experiments to prove what was going on.
1. OpenDiskFont() can handle, and really should have, a complete pathname
in the TextAttr struct. "ChaosGame:fonts/pearl.font" works perfectly.
2. But when using that VERY same TextAttr struct in a menu or a gadget, it
will fail 100% of the time due to a "bug" or "improperly documented
feature" of Intuition. When supplying TextAttr's to ANY intuition
function, there MUST be NO pathname component whatsoever! And the font
MUST exist in memory! Only the actual name of the font may be supplied.
So the solution is to have a PearlFont8TextAttrForOpenDiskFont that says
"ChaosGame:fonts/pearl.font" and a seperate PearlFont8TextAttrForIntuition
that says "pearl.font".
NOW FIXED.
----------------------------------------------------------------------
- End Font Bugs!
----------------------------------------------------------------------
Sent yet another new version of v2.84 to Frédéric for playtesting on
July 12th, 2000. It took approx 41 minutes to compile on my 25Mhz 030.
**********************************************************************
Bug Reports from Frédéric.
**********************************************************************
> * It seems to me that growths eventually stop growing, sometimes after a
> single turn.
JC: NOW FIXED.
> I have noticed very recently
> (between 2.83 and 2.84) that some growths tend to stop growing very rapidly.
> I once cast an orange jelly and it never grew at all !
JC: NOW FIXED.
> Sometimes Hippocrates or Aesculapius randomly kills one of my creatures
> with his healing Special Combat.
JC: I finally figured this out! It happened randomly because it was caused
by the Impurities code! Here is the offending line of code:
IF (Impurities and MSGRandom() % 800 < 2 and !isExposedWizard(defence)) combat=50;
I rewrote it thusly:
IF (Impurities and MSGRandom() % 800 < 2 and !isExposedWizard(defence)) THEN
IF (combat >=0) THEN
combat=50;
ELSE
combat=-50;
END_IF
END_IF
So the real bug was:
* BUG: With Impurities turned on, healing special combat sometimes kills
the creature being healed! NOW FIXED!
> * When a creature raised from the dead is covered by a growth and then
> uncovered, it is living again !
This is according to the rules of Chaos. If you search the docs for
"covered by a growth" you will see the rules pertaining to this matter.
> This is not normal !
Being undead is not normal!
If you don't want this to happen then you _must_ kill the growth yourself
before it dies of natural causes!
> * When a cloaked wizard who as scavengerism is scavenging a corpse, it says
> "Wizard 4 munches on a corpse of cloaked creature" !
This was a simple matter where I switched my variables. NOW FIXED.
> * Sometimes when a wizard is "killed" by justice/vengeance/exorcise in an
> unexplored region and is reinstated, his position is revealed (the cell he's
> in becomes empty for the duration of the "bonus spell" sound).
This was a bug whereby DrawCell(&NothingImage,cell); was being used instead
of the correct ReDrawCell(cell);
DrawCell() just blindly draws graphics into cells without taking into
account exploration mode.
ReDrawCell() knows about exploration mode and acts accordingly.
NOW FIXED.
> * The wizard that wouldn't die bug:
>
> Wizard 5 has 1 life point and -2 recovery. Each time he's attacked, it dies
> (allelujah sound, but no wizard dying sound). The cell is left blank but the
> wizard is still there if I move the mouse pointer over it. It can be
> attacked again and the same happens. The cell is eventually refreshed and
> the wizard reappears. I think he cast Lich lord during his first life but
> the lich lord icon is not in the list of his powerups now. He was killed at
> least 15 times by the independents !
>
> Autosaves 15,16,17.
Ok, this had nothing to do with Lich Lord. This was caused by the fact
that the wizard had cast Horror on himself. Each time he was killed the
Horror code kicked in and tried to replicate him, but there were no empty
adjacent cells. So he wasn't actually replicated and the Horror was not
actually used up and he didn't actually die.
I have now changed it such that:
1) If this happens again, the Horror gets used up. So it will only happen
once.
2) It now prints a text message and does a graphical effect to indicate
that the Horror process is happening.
3) It sets Life, Magic Resistance, Intelligence, Manuverability and Combat
to maximum. Move gets set to max(CurrentMove,InitialMove). This is to
make up for the fact that it didn't get to replicate.
NOW FIXED. Tested and works ok.
> * ????!? The wizard that wouldn't die died on turn 18 ! It was during
> boardupdate so I guess the giant rat bite did it.
The wizard who wouldn't die after being attacked multiple times by green
and golden dragons + tons of other creatures ended up dying by a simple rat
bite.
> * When the independents (but it may also happen for other teams, I don't
> know) kill a wizard, the word "Independents" at the bottom of the screen is
> erased just after the dying-wizard animation, and the movement phase
> continues without "Independents" to be reprinted.
NOW FIXED.
> * An evil wizard cast meddle but the following creatures were not affected:
> The exorcist, earth elemental. Is it because they have no reincarnation ?
Yes.
> Why wouldn't the exorcist reincarnate into a bandit or an orc ?
He was set to not reincarnate into anything.
I have now changed The Exorcist so that he reincarnates into a good little
Halfling.
> * A wizard destroyed a white dragon corpse with a magic bolt and the dragon
> cried ! It's an old bug you told me was allegedly fixed :-)
OOPS! I put the "and !isDead(b) and !isScroll(b)" code on 1 of the lines
that needed it but I forgot to put it on the other line that needed it!
doh! NOW FIXED.
> * The game ended as I killed the last piece of independent earthquake.
> However, there was still a bird lord alive belonging to a dead player
> (product of impurities).
With impurities, you can win the game in an impure manner 8)
Creatures that belong to dead players are no threat to you whatsoever so
there is no need to kill them.
**********************************************************************
End Bug Reports from Frédéric. (Is there ever an end? 8)
**********************************************************************
* Score Screen has now been translated into Français. I added in a teensy
amount of code for stringwidth sensitivity so that the screen looks good in
English and Français. I'll probably have to add more code when the game is
translated to other languages. I only added in the bare minimum amount
to make the Français score screen look good.
* SMALL BUGS: Microscopically small even 8) The following spells would,
in exploration mode, reveal the position of the target for a brief
instant by drawing a blank image in the target cell.
However, this blank image was immediately redrawn properly.
Apparently nobody ever noticed this small flaw.
It affected the following spells:
Armour, Brain Boost, Cloak, Combat, Cursed Sword, Magic Shield,
Meteor Storm, Recover Boost, Restoration, Sword of Sassenrath,
Scavengerism and Exophagy. NOW FIXED.
* ALL appropriate occurrences of DrawCell() have now been replaced with
ReDrawCell() I systematically went through the entire program and did
this. DONE.
* 1st and 2nd Spell Information Panels have now been 100% translated into
Français.
* Replaced all appropriate occurrences of player_name[x] with
PlayerName(x) in the entire program + coded the PlayerName() routine to
handle the multilingual translation issues. This took 1 hour.
* Sent Frédéric version 2.85 for testing/translating on July 19th, 2000.
* Sent JKD version 2.85d for OS 3.5 + MagicMenu + P96 + CyberGraphx
testing. He reports that Chaos works perfectly on all systems!
-------------------------------------------------------------------------
CODE REDUCTION UPGRADE
There are tons of no-longer-used routines in info.c. These were originally
used for the old 640x256 information panels. The code was still in the
game and active so that I could switch between the old way and the new
hires way any time I wanted. However, I never actually did that.
And now the old code is seriously out of synch with the new way of doing
things so I am finally eliminating it all.
Eliminated 1252 lines of code from info.c
Info.c 155488 -> 103018 SAVED: 52470 bytes of source code.
Chaos 433540 -> 420040 SAVED: 13500 bytes off the release version of the
Chaos executable.
All the code that I removed has been saved in SC:UnusedInfo.c in case I
need to reference it for some strange reason. Which I seriously doubt I
ever will.
---------------------------------------------------------------------------
* TEST lzx vs lha
I archived a complete demo distribution of the game
lzx: 4942881 bytes.
lha: 5298980 bytes.
SAVED: 356099 bytes.
* Sent Xav version 2.85 for playtesting on July 20th, 2000.
BEGIN: version 2.86
* Replaced EndTurn.8svx with Frédéric's EndTurn.8svx because nobody liked
the old end turn sound. I renamed the old EndTurn.8svx to MaxCombat.8svx
and changed the game code to play this sound anytime anyone casts a spell
that makes a creature have maximum combat. This means the following spells:
Combat, Touch of God, Chaos Lord.
-------------------------------------------------------------------------
Translation of IP1 (Information Panel 1) Creature Statistics Screen
to: Français.
* Scavenge translates to Charognardise which is _entirely_ too long.
So I'm leaving this in English. Someday when we make the AGA version
this can be changed to the "Scavengerism" spell icon, which looks quite
nice.
Magic Resistance translates to Résistance magique which is too long.
Résistance magique -> Résist. magique
Ranged Combat translates to Combat à distance which is too long.
> Ok, so how should the info panel look?
>
> Option A:
> Combat
> Tirer
> Combat spécial
>
> Option B:
> Combat
> à distance
> Combat spécial
>
> Option C:
> Combat
> ... à distance
> Combat spécial
>
> Option D:
> Combat
> Combat de loin
> Combat spécial
Xav: Option A is the good one.
JC: Option A implemented.
END Translation of IP1 (Information Panel 1) Creature Statistics Screen
to: Français.
-------------------------------------------------------------------------
* Reduced the amount of time that the horrible looking circular pattern is
displayed on the lissa-box requester things. Reduced it to 1/3 of its old
value.
* ADDED Multingual talklists code so that now the game can use talklists of
any supported language.
* The dir structure of certain things in Chaos has now changed. The
Screens/ dir and TalkListsDir/ have changed. So any further updates issued
need to be COMPLETE updates, not just the executable file.
Possibly other things in the dir structure or file structure have changed
also.
* FLAW: Touch of God and Chaos Lord do not do any sort of graphical effect!
So you cannot tell who it is being cast on! NOW FIXED.
* Improved CellEffect() with better sound file handling.
* PROBLEM: The req.library filerequester is optimized for use on
non-interleaved bitmaps. This means the scrolling sucks bigtime on the
chaos interleaved bitmaps. It colorflashes horribly. It goes from having
the best scrolling of any filerequester to suddenly having the worst
scrolling of any filerequester. So I opened up yet another new screen.
This one is just like the old HiResScreen only it is noninterleaved.
Now the scrolling looks fast and smooth again! NOW FIXED.
* LOAD/SAVE screens now have smooth scrolling once again.
* Copied the entire gamedir over to Chaos_2.9/ so that I may now begin work
on the Enhanced Graphics Version on Tuesday, July 25th, 2000.
* Fixed Passage description.
* July 25, 2000: The size of the release executable file "chaos" is
421048 bytes.
*************************************************************************
* BEGIN ENHANCED GRAPHICS VERSION V 2.9 July 25, 2000 *
*************************************************************************
I have written a new graphics system that uses standard iff pictures to
describe how monsters and magic spells and all other objects in the game
look.
Each object in the game has its own 320x256 64 color EHB mode iff file.
The name of the file is, and must be, the exact name of the object in
English. The spaces must be there so don't try to rename them.
All the files are already included with the proper name in gfx/Spells/
so you don't need to worry about this.
All you have to do is edit any of the files you want and they will
automagically get included into the game. Unless for some reason the clock
in your Amiga is broken. In which case you may have to type in the shell:
delete gfx/dat/#?
That will delete the graphics index files and force the game to rebuild
them from scratch. It takes a full minute to rebuild all the tiles from
scratch because it must open and close 350 files + read in 350 files +
decompress 350 files + cut and paste 731 tiles, check for blank frames,
etc. These numbers are only accurate as of July 25th, 2000. The numbers
will be much larger in the future.
If you change any graphic file then the next time you start the game, it
will notice that you have changed something and will rebuild the tile
indexes. This will take a full minute or more.
Selecting "New Game" from the menu is currently not sufficient to reload
the tiles. You must completely quit the game (exit to DOS or WorkBench).
Then reload the game and all will be well. 8)
The old 3 frame animation limitation has been ERADICATED. You may now draw
or render as many frames as you like.
The old 32-color limitation has been ERADICATED. I couldn't think of any
conceivable reason why any strategy game should be limited to 32 colors.
All Amigas support 64 colors or more so we are going to use them.
Ye Olde Rules for GrafixMages:
==============================
0. The first 31 pixels at the top of the screen are ignored.
1. All Living Creatures _MUST_ have a dead image! (Even if you just cut &
paste in an image of a dead orc.) The leftmost tile is reserved for
the dead image and only the dead image.
2. All Inanimate Objects and Growths and Undeads must _NOT_ have a dead
image. Its dead image space should be blank.
3. You may have as many frames of animation as you like. Ping-Pong
and continuous looping playback are both currently supported.
4. In order to specify that you want your animation played in looping mode
you must change the purple line at line 32 to be color #1. This tells
the game to play this animation in a continuous loop.
5. The animation frames are terminated by the first completely blank frame.
6. The image must use the supplied palette. If you rearrange the palette
for artistic reasons then you _MUST_ rearrange it back to its original
state before saving the file. Failure to do this will result in
wrong-looking graphics.
7. If you want to leave extra grafix on the screen that you are working on
then that's ok. They will be ignored. Only the tiles up to the first
blank tile are processed by the game. Any extra gfx at the bottom of the
screen are ignored.
----------------------------------------------------------------------------
* BUG: When playing in exploration mode, if you try to examine an
unexplored cell and the cell has a scroll in it then it lets you read
the scroll! NOW FIXED.
* BUG: Joseph Conwell reports that he cast Sword of Sassenrath on his Orc
and then when it promoted to Mighty Orc it lost its Sword of Sassenrath.
JC: This is because it promotes to whichever stat is bigger. 0 > -1 so
it makes sense. However I have now hacked in some extra code so that
if you posess negative special combat then it will be promoted to
whichever stat has the greatest absolute value. NOW FIXED.
1. Write and test code to read in all the tiles from IFF files. DONE.
2. Load new color palette. DONE.
3. Rewrite ColorCycler. DONE.
4. Redefine all #defined colors to new values. DONE.
5. Rewrite ReDrawCell() to use the new multiframe-capable form. DONE.
6. Totally rewrite the animator task to handle the new tiledata + keep
track of the multiple framecount stuff and which direction it is going
through the animation in.
Animator tasks needs the following variables:
1. WORD FrameCount so it knows what frame it is on.
2. WORD AnimationDirection. 1=Forwards, -1=Backwards. (for ping pong playback)
0=stopped.
3. BYTE PlayBackType 0=PingPong. 1=ContinuousLoop.
ALL DONE.
7. Rewrite sm.c to handle new variables:
sm.c FrameCount will ALWAYS be set to 1
sm.c AnimationDirection will ALWAYS be set to 1.
ALL DONE.
8. Edited Meteor Storm spell to work with new system. DONE.
9. Rewrite the entire game to use the new system. DONE.
10. Eliminate all old references to the old hardcoded cimage1[], cimage2[]
and cimage3[] arrays which limited the game to 3 frames of animation.
DONE.
11. Eliminate all old references to DeadImages[] array. DONE.
12. Added the code to support loading files with CONTINUOUSLOOPing anims.
Just change the color of the first line to #1 and the anim will play in
looping mode. DONE.
13. Hack in code to write out all those hardcoded cell effects gfx and
color convert them to the new palette and store them as IFFs in the
gfx/CellEffects/ dir. DONE.
14. Write code to read in the IFF CellEffects. DONE.
15. Rewrite CellEffect() to use the new IFF gfx. DONE.
16. Rewrite BoardEffect() to use the new IFF gfx. DONE.
17. Remove all hardcoded explosions and magical effects graphics. DONE.
18. Don't load the old graphics file "chaos.dat" anymore. DONE.
19. REMOVE all graphics handling from sm.c. DONE.
20. Edit all 349 spell files and remove all spell-descriptions and imagery.
Remove all Description: info and Imagery: info and Image: info. DONE.
21. Edit sm.c to remove all code related to reading/processing/including
image files into the compilation process. DONE.
22. Edit sm.c to remove all code related to reading/processing/including
spell descriptions into the compliation process.
Comment out or delete everything to do with spell descriptions.
DONE.
23. There are several programs that are being compiled by the makefile in
order to make the old compressed spell descriptions file "pool.ssc"
Eliminate them. DONE.
Now that I've eliminated all that stuff from the makefile
(spell descriptions, text compression encoding & decoding routines)
+ all that stuff from the spell manager (description processing and
image processing) a smake clean smake developer version now takes only
11.5 minutes on my 25 Mhz 030 (freshly booted, not on the internet)
24. Convert all the levels to the new animation system.
A. Load each old level.
B. Go through the entire visible board and underboard
C. If FrameCount==0 then FrameCount=1;
D. Stuff 1 into the AnimationDirection
All levels have now been converted to the new animation system! DONE.
25. Edit io.c to handle loading a game that was using one set of graphics
files into a system that is using completely different graphics files.
Check for any currently illegal settings and adjust them. DONE.
26. Add in gfx/Spells/ and gfx/dat/ and gfx/CellEffects to MakeDemoOfChaos.txt
DONE.
27. GRAPHICS:
Put in Xav's new moon from setupscreen as Sanctuary. DONE.
Put in Kreton's Wizard graphic as Wizard 1. DONE.
Edit Generator. DONE.
Remove blood from ShapeChanger. DONE.
Spriggan is messed up. Fix him. DONE.
Mess with Witches as new wizards. Leave this for Xav.
Amphisbaena is all messed up. Leave this for Joe or Xav.
28. Edit SpellManager script file to remove everything to do with
spell descriptions and images. DONE.
29. Add in code to load the setupscreen1 from
gfx/Screens/English/SetupScreen1.iff DONE.
30. Rewrite the setup code to have everything on SetupScreen1 positioned
correctly. This took some time because the name gadgets were
overwriting the border. DONE.
31. Add in code to load the setupscreen2 from
gfx/Screens/English/SetupScreen2.iff DONE.
32. WOOPS! I forgot to rewrite PutToSleep() to stop animating creatures
that are asleep! There is a sleeping Pegasus that is still flapping
its wings like crazy! NOW FIXED.
33. Rewrite Flesh to Stone and Mass Petrification to properly stop the
newly created inanimate object from being animated. DONE.
34. Rewrite Stone to Flesh and Inanimorphobiosis to properly reactivate
the animation on a previously-animated creature. DONE.
35. Put Xavier in the scrolling credits and the docs. DONE.
36. FLAW: The pentagrams on the "About" screen are now invisible due
to the new color palette! NOW FIXED.
37. Add in code to load the EndTurn, Question Mark, Dismount, Load and Save
gadgets from gfx/Gadgets/English/
How to test a lzx archive:
lzx t archive.lzx >T:test.txt
After converting all the gfx to IFF files, the following spells looked
horrible and I spent some time editing them.
Abath: I antialiased him and redrew his horn so now it looks really good.
Abduction Converted horribly so I edited it some.
Achiyalabopa: I added texture + antialiased it.
Acid Rain: Antialiased it. Beveled it.
Aerial Servant: I added texture + antialiased it.
Aesculapius: Skipped. I think Xav has already redrawn it + Aes drew one in
64x64 that needs to be shrunk down and used for this creature.
Put in Xav's new "Snake" Aesculapius + drew a dead image for it.
Agathion: Antialiased it.
Air Elemental: Antialiased it.
Alliance: Antialiased it.
Alter Reality: I attempted to shade it with shadows. Limited success.
Alternography: antialiased it.
Amphisbaena: Antialiased it.
Animate: Included Xav's stupendously wonderful looking Animate!
Apple Wood: Added some texture. Antialiased it.
Arborist: Antialiased it.
Archery: Antialiased it.
Arctic Wolf: I got rid of the hard black background + antialiased it. Then
I changed the colors to be whitish like an Arctic Wolf should really look.
The old wolf I saved as "Dark Wolf" for future use.
Armour: Antialiased it. Replaced it with Xav's gray-scale Armour.
Aviary: I hated how the old one looked so Joe and I completely remade it.
Azer: Antialiased it.
Included Joseph's improved Abath, Arborist, Alliance, Agathion, Azer,
Apple Wood, Aviary. I totally redid Joe's Aviary and Apple Wood and
Archerotomy.
Included Xav's improved: Agathion, Air Elemental, Acid Rain.
I made a new variation of the baboon called baboon2. I may use
this in the future somehow.
Baboon: Antialiased it.
Banderlog: Antialiased it.
Bandit: Antialiased it.
Basalt Golem: Antialiased it.
Basilisk: I gave the basilisk a purple eyeball + Antialiased it.
Battle Cry: It converted badly so I fixed it. Then I anti-aliased the flag
also.
Bat: Antialiased it.
Bat: I went back and totally redrew it and made a new dead body. The only
problem now is that it is not animated :(
Included Xav's new well-drawn and animated Bat!
Betrayal: converted horrbily so I had to fix it. Then I added shadowing to
it.
Biohazard: Beveled it.
Bipedal Generator: I always hated the way the Bipedal Generator looked so
I anti-aliased it, recolored it and beveled it.
Bird Lord: I antialiased it. Then I went back and antialiased the
antialiasing so its SUPER smooth looking.
Blue Dragon: Double antialised it. Its super smooth now!
Bodak: Antialiased it.
Boil: Antialiased it. It looks a LOT nicer now! Redid it using Xav's new
Flood graphic.
Bolter Wall: I made it rotate.
Brain Drain and Brain Boost converted badly so I fixed them then I
anti-aliased them. Now they look really nice! (compared to how they used
to look)
Brain Drain Beam converted horribly so I edited it and fixed it up and
antialiased it.
Bury: Antialiased it. Threw it away because it sucked. Pirated the bloody
corpse from Xav's Scavengerism and the arrow from Xav's Animate and then
drew some grass and a pile of dirt. It looks 10x better than the old one.
Burstroem's Browser: Included Xav's book. Added more antialiasing to the
bottom of the book.
Included Joseph's new Bandit and Baboon. They are both MUCH better than the
originals!
Included Joseph's new Battle Cry and Biohazard. Battle Cry REALLY needs
32x32 pixels and 256 colors!
Included Xav's Fantabulous Battle Cry!
Included Xav's new Biohazard. I will use Joseph's Biohazard as something
else.
Included Joseph's new Bipedal Generator and Bodak.
Edited Joseph's new Basalt Golem into an animation and included it.
Camel: Double Antialiased it and made the hump bigger too.
16x16 pixels is such an absurdly low resolution that it is many times not
possible to do proper anti-aliasing :(
Cartography: Antialiased it. Included Joe's new Cartography.
Cat Lord: Antialiased it. Included Joe's new Cat Lord.
Centaur: Antialiased it. The tail looks much better, its fluffier.
Chaos Lord: Antialiased. Included Joe's new Chaos Lord.
Chronomancer: Antialiased it. Replaced it with Xav's Chronomancer from his
setupscreen. Drew a dead body for it.
Clay Golem: Made a dead body for it.
Cloak: antialiased it. Included Joe's new cloak. It could be better.
Combat: Included Joe's new Combat.
Combat Drain Beam: Included Joe's new Combat Drain Beam.
Command: Didn't translate so well so I fixed it. Later on I replaced it
with Xav's fantastic new version!
Confidence: I included Joe's new Confidence.
Convert: Changed the "M" to a "C" and antialised the whole thing.
Crimson Death: Antialiased it.
Crocodile: Antialiased it. Included Joe's slightly improved Crocodile with
texture on his back + it now has feet.
Cursed Sword: Antialiased it and made the hilt a bit smaller.
Dalek: Antialiased it. Included Joe's improved version + double antialiased
it.
Dao: Antialiased it.
Dark Citadel: Antialiased it.
Dark Wood: Antialiased it. Replaced it with Xav's new bleeding version.
Dead Revenge: Antialiased it. Included Joe's improved version.
Demon: Antialiased it.
Depth: It was already partly antialiased! Oh well, I antialised it all the
way and now it looks sort of fuzzy but there is NO blockiness at all.
Derro: Antialiased it.
Destroy Wall: The converted version looks BETTER than the original! No
changes made.
Dire Wolf: Antialiased it. It really looks better.
Discard: Antialiased it.
Disection: Antialiased it.
Disrupt: Antialiased it.
Dragon Nest: Antialised it but it didn't work out very well. :(
Drain: Antialiased it.
Dread Elf: Antialiased it.
Drelb: Antialiased it.
Dual Earthbind: Antialiased it.
Eagle: Antialiased it.
Earth Elemental: Included Joseph's new version.
Eidetic Xenogenicide: Joseph totally redesigned it. It looks much better.
Elephant: Antialised it.
Sent Xavier Elf Boots + Harpy because I don't know how to make these look
better.
Elm: I 100% Antialiased it.
Emerald Dragon: I 100% antialiased it. It looks really nice now.
Encumberance Beam: I included Joseph's new version.
Exorcise: I simply replaced the old Exorcise graphic which wasn't so bad
with a new one designed by Aes which is TOTALLY AWESOME! It has great
shading in it!!! Oops its 2 pixels to tall and 2 pixels too wide!
NOW FIXED!
Falcon: Antialiased it.
Faun: Antialiased it.
Fir: Antialiased it.
Fire: Antialiased it.
Fire Bat: Antialiased it.
Joseph made a new "Bat Out of Hell" graphic (It might not be 100% finished
yet)
Fire Demon: I antialiased it and made the color texture a bit better.
Fire Elemental: I antialiased it and changed some pixels around to add some
extra color.
Fire Shield: Antialiased it a tiny bit.
Fireball: Antialised it. Replaced all green with Purple. Replaced all
Gray with Orange. Splattered some more orange around in the red.
Flesh to Stone: Antialiased it. Replaced all Green with light gray. The
rock had many transparent black holes in it! I Replaced some of these
with dark gray and others with hard black (nontransparent). I also added
some shading to the "+" which looks very nice.
Floating Eye: Antialiased it and cleaned it up some. It looks better now.
Flood: Antialiased it and threw some extra colors arond randomly in 1 of
the frames.
Flood Shield: Antialiased it and then added beveled edges and more color.
Fly: Antialiased it.
Free All: Antialiased it. Changed the color of the 2nd key to be
compatible with antialiasing.
Generator: Antialiased it.
Ghast: Double Antialiased it.
Ghost: Double Antialiased it + added sparkle to the white and blue dots.
Ghoul: Antialiased it and added sparkle to the dots.
Giant Beetle: Antialiased it. Used a beetle clipart as a template to
redraw it. NOW IT LOOKS AWESOME!
Giant Rat: I antialiased it and it now looks WAY THE HELL better!!!
Giant Spider: Antialiased it but the colors were so dark to start with that
you can't really see any difference.
Goblin + Goblin Bomb: Antialiased.
Golden Dragon: Antialiased. It looks much better now. This creature
already had halfway good shading to it.
Gooey Blob: I single antialiased it and it looked good. But there are so
many shades of the same green in the palette I decided to go ahead and
double antialias it. It now looks very fuzzy. I'm not sure if this is
better than single antialiasing or not. It does look smoother and less
pixelated but its very fuzzy. Its probably better to have it look fuzzy
so I'm leaving it like this.
Gorilla: Antialiased it.
Gravity Sphere: It looks horrible and I didn't bother trying to fix it in
any way.
Gray Elf: Antialiased it.
Green Dragon: I antialiased it. Then I tried adding some shadowing and
texture and it came out quite nice! Its nowhere near Xav-Quality but its a
lot better than it was originally.
Green Oozey Crap: I screwed around with it and stuff... It looks better
than it did.
Grizzly Bear: AntiAliased it and added some shading to the dead image.
Gryphon: Antialiased it.
Halfling: Antialiased him. Made his dead image be decapitated with his own
sword.
Harpy: I antialiased it. Ack! Its drawn on a hard foreground black!
NOW FIXED. A few days later I went back and partly double
antialiased it and added some simple shading to it.
Haste: Antialiased it. I tried to add a drop shadow to the + but it looked
terrible.
Haunt: I antialiased him then I animated him! This is my first attempt at
animation.
Hidden Horror: This is supposed to look identical to a halfling so I just
copied the Halfling as this.
Higher Devil: I only made extremely minor touchups on this.
Hippocrates: Antialiased him. Moved him to the edge to make room for my
new improvements. Added a Caduceus and a Red Cross so that it is
obvious that he heals. Removed the Dead Orc Image and made him a
real Dead Image.
Horror: Antialiased it and added some simplistic shading.
Horse: Antialiased it.
Hybsil: Antialiased it.
Hydra: Antialiased it. Added shading.
Hyperclone: Made simple modifications.
Ice Breath: Tried to antialias it some.
Imp: Antialiased it and added some nice shading! Redrew the Dead Image.
Inanimage and Inanimatologist look identical to a Wizard 1!
I propose:
Xav's Wizard 1 becomes Inanimage.
Xav's Wizard 1 minus the wand becomes Inanimatologist.
There will be a completely new wizard for Wizard 1. (I'll decide which
graphic later on)
This means the old Inanimage/Inanimatologist/Wizard 1 will be used for
absolutely nothing! But I can assign him to be something later.
I can also draw sparkles around the end of the wand.
Inanimorphobiosis: I couldn't really do anything to this because it just
plain needs a much better rock.
Invert: I messed around with it some... Didn't really improve it.
Jaguar: Antialiased it.
Jann: Antialiased it. The dead image was the same as the Dead Orc so I
redrew it.
Joker: I added shading to it and made it look 8x better than before!!
Juju Zombie: Antialiased it.
Justice: Change the shading on part of his face.
Kill: Added Beveling with only limited success.
King Cobra: Antialiased it and added a bit of shading.
Leopard: Antialiased it and changed the green spots into golden spots.
Lesser Devil: Antialiased it.
Level: Beveled it and shadowed it.
Lich: Antialiased it and gave it yellow eyes.
Lich Lord: Antialiased it and gave it yellow eyes and modified the crown.
Lightning: Beveled it.
Magic Bow: Antialiased it and made the curve of the bow extremely smooth.
Magic Castle: The original was so so hopeless looking that I didn't bother
trying to smooth it out. I just replaced it with Xav's "Dark Castle".
The Dark Castle has a flaw: The Door and windows are made of the
transparent black instead of the hard foreground black. NOW FIXED.
Magic Knife: I replaced the old one with Xav's new one.
Magic Shield: I simply replaced the old one with the one that Aes drew for
me many months ago. However this shield looked like a normal shield. But
this shield ONLY increases your magic resistance so I added some
color-cycling to it so that people would remember that it is a _magic_
shield not a real shield.
Magic Sword: I replaced the old one with Xav's new one.
Magic Wand: I never liked the old one so I drew a completely new one.
Magic Wood: I completely redrew the trunk so its 10x better. I haven't
decided what to do about the treetop though? Should it be a normal treetop
but with some color cycling added to indicate its a magic tree? Or what?
Manticore: I antialiased it then I drew a shadow under the wing. The
shadow looks nice.
Marid: Antialiased it and added the stripe to the dead image.
Mass Morph: I just took Xav's Animate spell and switched it around.
Memory Master: Antialiased him and made a completely new dead body with
blood splats and decapitated head.
Memory Mage: (Originally looked identical to Memory Master). I took my new
Memory Master graphic and gave him a Magic Wand + shaded his costume
according to the light shining on him from the magic wand.
Mind Flayer: Antialiased it. Added a bit of shading.
Mount: Antialiased it. Added a bit of shading.
Move it: Antialiased it, beveled it and made the whole the green for "go"
Mud Man: Antialiased it. Totally redid the color + added a bit of shading.
Totally redid the dead image.
Neo-Otyugh: Antialiased it and darkened the back leg.
Nightmare: Antialiased it and darkened the back legs.
No Grow: Antialiased it and added texture.
No Mount: Antialiased it and made the tail better.
Nuke: Redrew it. Antialiased it.
Ogre: Antialiased it, shaded it, made the arm have a shadow, improved the
head.
Ogre Mage: The Ogre Mage looked identical to the Ogre so I just kept it
that way for now.
Ogre Warrior: The original Ogre Warrior was just a mirror image of the Ogre
so that is how I did the new one. I just mirrored the Ogre and saved it.
This means the shadowing is actually backwards. But oh well... we can
worry about that later. Maybe it will be funny to have a backwards shadow
on him?
Ogre Assasin: He's just like the Ogre Warrior but with a differnet
animation sequence. He has the backwards shadow as above.
Oracle: Designed by Xav. I brightened the crystal ball a bit and made it
look like the Oracle's fingers were touching the crystal ball.
For the dead image I drew a crystal ball laying on the ground + pirated
the dead image from Scavengerism.
Orange Jelly: Antialiased it. This graphic needs professional attention.
Orc: Antialiased it. Changed his face.
Orcs: same as Orc.
Paradigm Shift: Antialiased it.
Passage: Antialiased it. Beveled it.
Pegasus: Antialiased it.
Pit: Recolored it and antialiased it.
Probably use a Xav graphic for Plasma Beam.
Platinum Dragon: Antialiased it. Double Antialiased parts of it to make it
really smooth.
Points: Antialiased it. Beveled it.
Poison Dagger: Antialiased it. Drew blood on it. Drew blood dripping from
it. It now looks really cool.
Pool: Antialiased it.
Power Wall: Antialiased it.
Pox Shield: Antialased it.
Protection: NEEDS TO BE REDRAWN!
Pseudodragon: Antialiased it. Added a bit of shadow under the wing.
Double antialiased parts.
Pyrohydra: Its identical to the Hydra.
Pyrotechnics: Antialiased it. Beveled it.
Python: Antialiased it.
Quench: Antialiased it + smoothed the fire a bit.
QuickShot: Antialiased it and beveled it and changed the color to use the
color cycling color and some brown.
Radioactive Land: It was just a bunch of green dots, it could have been
grass! I changed the green dots to purple dots so now it really looks
radioactive.
Raise Dead: Pirated some of Xav's gfx and rearranged them and edited them
into a nice Raise Dead graphic.
Range Boost: Antialiased it and beveled it.
Red Dragon: Double antialiased him.
Reflector: The colors did not convert well so I recolored it and
double-beveled it.
Replicate: I tried to antialias it but it came out looking HORRIBLE so I
left it alone.
Repulsion: Double beveled it and added many more shades of color.
Roper: Antialiased it + shaded it.
Separation: Took the alliance spell and drew a big X over it.
Shadow Dragon: Antialiased the arms. Put a 3,1,0 brown dot at the end of
the tail and foot.
ShapeChanger: Joseph should do some kewl morphing with this!!
Skeleton: Antialiased it.
Slow: Beveled it.
Solar: Antialiased it.
Spectator: Made it perfectly round. Antialiased it. I could easily make
an awesome animation out of this one! *****************
Spectre: Antialiased it.
Speed: Beveled it.
Spriggan: Antialiased it.
Still: Antialiased it.
Stone Giant: Antialiasd it.
Stone Golem: Made a better dead body.
Stone to Flesh: Pirated some Xav gfx to make this one.
Strong Wall: Darkened it.
Subversion: Beveled it.
Summons: Beveled it.
Swap: Changed the colors a bit + beveled it.
T-Rex: Antialiased him. Double antialiased his back.
Teleport: Remade it using Xav's little man graphic.
Tempest: Antialiased it.
The Exorcist: I went crazy and totally redrew him with magical crosses that
are animated with magical glowing + he turns his head. I also made a dead
image of him in a pool of blood with his cross stuck threw his body!
Its totally cool! His legs could be better though, but I don't know how?
Thundermare: Simple antialiased him + added blood on the dead body.
Torment: Beveled it.
Troll: Simple antialiasing + some blood.
Ubiquiscope: Beveled it.
Unicorn: simple antialiasing. Changed the horn to white.
Vampire: Antialiased it. Shaded it.
Vodka: Find Kreton's Vodka!!!!
Volcano: Antialiased it a bit.
Vortex: Antialiased it a bit.
Vulture: Antialiased it. Shaded it some. Does this look ok?
Wasp Nest: Antialiased it. The curves are ultra smooth now.
White Dragon: Antialiased it. Added shadowing under the wings.
Wight: Antialiased it.
Wolverine: Antialiased it. Tried to put some blood on the dead body.
Wood Elf: antialiased it. Joseph improved it some. Then I drew an arrow
stuck in his head for the dead body. hehe.
Wraith: Antialiased it.
X-Ray: Beveled it. Replaced the whole thing with Joseph's new color
cycling X-ray.
Zombie: Antialiased it. Tried to shade it some.
All spells A-Z are done!!!!! (EXCEPT FOR W!!!)
All W is done except for Wizards!
Went through Joe's L-Z.
Added in Joseph's new:
spectator, spriggan, speed, storm, sleep, skeleton, Hyperclone, Shocker.
Shape Changer, Shadow, Magic Attack, Lich Lord, Leopard
Put in Joseph's new: Joker, Justice (goatee), Iridium Horse (back leg),
King Cobra (hood, now brown), Imp (more frames of animation), Hippocrates
(now has a 2 pixel hat), Free All (now has 3 keys instead of only 2),
Dark Power (multi-shaded green), Aerial Servant (many frames of animation
+ different colors)
Eye for an Eye: Needs to be totally redone! Animate Sux! Exophagy doesn't
even have a graphic!
Sent Eye for an Eye, Animate, Exophagy to Xav along with spell
descriptions: They came back looking unbelievably awesome!!!!!
I removed the green from the side of the Tree in Animate.
Xav's Telescope: I lightened the moon.
Included Xav's Magic Bolt, Magic Glass, Mana Battery.
Included Xav's amazingly great new: Shadow Wood, Dark Wood, Fir Tree,
Magic Wood, Apple Wood.
Included Xav's amazingly great new: Violet Fungi, Gooey Blob, Green Ooze,
Orange Jelly, Fire, Flood, Earthquake.
---------------------------------------------------------------------
* August 2, 2000: The size of the release executable file "chaos" is
325816 bytes. On July 25 it was 421048. SAVED 95232 bytes!
* Sent v2.9 to Xav on August 2, 2000 so he can design gfx for it over his
2 weeks vacation.
* Put in Xav's fixed Wizard 2, Wizard 3 and Fly. We still need 4 female
wizards.
* Xav says to change the French spell desccription of Dark Citadel from
Citadèle to Citadelle. DONE.
* August 5, 2000: TileCount=824. There are 824 tiles in the game.
* BUG: Mana Battery Scrolls give bonus spells just like a real Mana
Battery. NOW FIXED.
* BUG: 1 occurrence of "Brain Dead" was not using translated strings thus
it was always appearing in English.
* Sprained my brain. No work done for 10 days.
* August 15, 2000: Replaced all occurrences of "Run JCsound >NIL:" with
"Run <>NIL: JCsound <>NIL:"
********************************************************************
Xav Returns from Vacation! Lots of new Tiles!
********************************************************************
Included Xav's new gfx:
Ball Lightning, Basalt Golem, Bless, Charm, Clay Golem, Coercion,
Cure, Dalek, Dao, Dark Wood, Death Bringer, Demonic Touch, Depth,
Destroy Wall, Discard, Double, Elephant, Fireball, Freeze,
Haste, Horse, Hyperclone, Irvine's Invulnerability, Justice,
Lightning, Lion, Magic Bow, Meteor Storm, Moveit, Mullac de Irvine,
Protection, Pyotechnics, Quickshot (quickshot is hard to read but I went
ahead and included it anyway).
Radioactive Land, Recover Boost, Reflector, Replicate, Request, Reveal,
Restoration (I didn't like the one with the dithered heart, it needs more
shades of color or higher resolution so I used the nondithered version.)
Seismology, Shocker, Simulacrum, Sleep, Solar, Standard Wall, Stone Giant,
Stone Golem, Storm, Strong Wall, Touch of God, Triple,
Turns (I redid the 0).
Uncertainty, Unicorn, Vodka, Volcano, Wake, Weak Wall, Wight,
Wizard 1, Wizard 1, Wizard 6, Wizard 7, Wizard 8, Wizard Wings, Wraith,
Zombie.
The following gfx were identical to the gfx already in my version of
the game: Fly, Wizard 2, Wizard 3.
********************************************************************
END: Xav Returns from Vacation! Lots of new Tiles!
********************************************************************
August 18, 2000:
* Included Frédéric's new Français Spell Descriptions: Water Elemental,
Sluggishness Beam and Combat Drain Beam.
Frédéric bug report:
* Something strange happened when I cast consecrate on a higher devil sitting
on the bottom border of the screen: the devil himself was not killed, of
course, but the spell did extra sound effects, as if there had been creatures
below. And I heard an allelujah sound, and at the end of the turn the bonus
window opened. No victim, no "Other", but I had the choice of 1 spell among
31 !!!
The trouble was that the Drainer() function had NO error checking! Ack!
all these years its been affecting cells that don't exist! NOW FIXED.
* Sent all English and Français spell descriptions to Red|Blue in Quebec for
proofreading. He liked the game "Romance of the 3 Kingdoms" and "Bandit
Kings of Ancient China" so I figure he'll like Chaos.
>>> * Due to impurities, a generator went asleep but continued to generate
>>> sleeping creatures. It's kind of strange don't you think ? Impurities
>>> shouldn't put generators to sleep ! They should only change their
>>> allegeance to a wizard or the independents (the sleeping creatures
>>> generated are often destroyed as soon as they are generated :-) )
>> This sounds sooooooooooo hilarious!!!! I don't know how you find all
>> this weird stuff out!!!! hehehehhahahahahahah 8)
>> It sounds so funny I'm not going to change it. I've never seen it
>> happen before! And if it does happen it must be very rare.
>
>> I probably should fix it so that it doesn't change to dead wizards...
>> either that or let creatures move, even if they belong to a dead
>> wizard.
>
> That would be a good enhancement. And change the dead revenge so that dead
> players keep control of the generated creatures.
* NEW FEATURE: I have now adjusted the code, such that if a creature exists
who belongs to a dead wizard, the creature will still be moved as usual.
* DEAD REVENGE IMPROVED: I have now adjusted the code such that a wizard
who is killed while posessing the Dead Revenge powerup will not lose ANY of
his generators! The wizard will die, but his generators will live on!
And any creatures produced by the generators will be controllable by the
player! I forsee this as being strategically important primarily in
multiplayer games where a certain wizard may be killed first, but can still
have some influence in the game due to his generated creatures.
For years I haven't even bothered casting Dead Revenge because it just
didn't really seem to benefit me; there were always better spells to cast.
Now however, I will always try to cast Dead Revenge!
* EDITED Dead Revenge spell description.
On 18-Aug-00, Frédéric Delacroix wrote:
> I have found a strange bug in the game related to the chaos lord and fire.
> It could be the fire shield (and possibly other shields) that's not working.
> Here are my notes.
> * BUG ! My wizard (an undead chaos lord, by the way, with shocker) was
> covered by its own fire breathed by one of my 3 platinum dragons, but it did
> not die !!! I destroyed the fire with another platinum dragon breath, and I
> could see a very very strange animation, alternating: my wizard (wizard 1),
> a grey elf (previouly dead) and the dead grey elf. I guess this is because
> the fire had 3 animation frames... ? When I query the stats, everything is
> back to normal chaos lord stats, except for life force who's back to 19.
>
> * No wait ! There's another big strange difference ! It's Wizard 1 belonging
> to nobody ! And it moved and attacked (but only shot once instead of three)
> with the independents ! He killed my cats ! What a strange creature ! I kept
> the autosave (083)
> * Actually it moves between me and my cats (I have the cat lord), not with
> the independents.
JC: ok, I have investigated this and it all comes down to this:
* BUG: Fire Shield and Flood Shield DO NOT WORK! Ack! All these years
Fire Shield and Flood Shield have not been working! NOW FIXED.
Included Frédéric's new English and Français spell descriptions for
Power Walls and Webs.
--------------------------------------------------------------------------
New tiles from Xav:
Copied XMAN.IFF to UnusedGfx/Xman2.iff
Copied QUERY.IFF to UnusedGfx/
Included the new Camel, Fire Bat, Mnemicide, Nuke, Singular Earthbind and
Zombie gfx.
Ogre: I haven't decided what to do about the Ogre yet. Maybe I'll use
him as the Ogre Warrior? He looks good, but he's not animated + I
really REALLY like the shadow on the current Ogre. I'll probably
make him the new Ogre Warrior.
Orc: The orc looks great! But the problem is that an orc is very wimpy in
this game and he should not be so big. He should be small and wimpy
looking. He can look good, so long as he is smaller to reflect his
weakness compared to other creatures.
Do you think you could make a small creature to be the orc?
-------------------------------------------------------------------------
I went through Joseph's new gfx.
Included Joseph's new Mutate, Platinum Dragon, Pool, Recognomancer, Roper,
Tempest, Wizard 3 (just changed the black eyes to brown), Wizard 8.
The new Halfling looks good, but his helmet makes him look bigger. We
really need the Halfling and Imp and Orc to be small creatures.
* FLAW: When a Tempest kills something, it doesn't make the dying noise and
it doesn't print any text message either. It just sort of disappears.
NOW FIXED.
On 22-Aug-00, Frédéric Delacroix wrote: ---------
> * Garbage appears in the french translation when I have reveal in my spell
> list and the mouse pointer is over it. I get something like
> "RévélerÜF\«JI@". I looked at the "Reveal" description file but it seems ok
> to me... ? This only happens with this spell.
JC: It is the very last spell. The very last spell wasn't being
NULL-terminated. NOW FIXED.
> * When a creature has a negative combat statistic, it can heal other
> creatures. But the "m" key does not show it can move over friendly creatures
> to heal them.
NOW FIXED.
-------------------------------------------------------------------------
* BUG: If you shoot and kill your own wizard, when you end your turn,
sometimes various random enforcer hits happen and always various random
bits of memory get corrupted. This was caused by MoveWizard() being
performed on a dead wizard so it thinks the wiz is in cell -1 which
causes many illegal mem accesses. NOW FIXED.
August 28th, 2000: The electricity was out from around 2:00 a.m. to about
7:40 a.m. There was no light! I couldn't see anything! It was like
living in the dark ages! I couldn't get on the internet! And I couldn't
play Chaos! I almost died!
* Included Xav's new Singular Earthbind, Dual Earthbind, Dragon Nest and
Goblin / Goblin Bomb graphics.
* BUG: The archery effect randomly locks up the entire computer (sometimes).
Using logfile code I was able to narrow it down to the following piece of
code:
DO_WHILE (px != tx)
register double y = (double)(mx - px);
AUDIONote (i--);
MaskWritePixel (rastPort, px, (WORD)py - h + (WORD)(d * y * y));
px += e;
py += dy;
LOOP
I was unable to narrow it down any further. I inserted more logfile code
to prove for a fact exactly which line was causing the machine lockup but
then the bug refused to happen.
AUDIONote() and MaskWritePixel() are used countless times throughout the
game and have proven themselves to be 100% reliable. So what could the
problem be? What is different about this use of those routines and any
other? ANSWER: The animator task is STILL RUNNING during the archery
effect! During all other effects there is an ObtainSemaphore(&BoardLock);
which prevents the animator task from running! The archery effect would
actually look better if it had an Obtain/Release Semaphore pair in it.
Ok, but the main program and the animator don't share any variables that
are changed anywhere EXCEPT for 1 thing: The animator task contains the
following code:
AnimatorrastPortLayer=rastPort->Layer; // Disable clipping while we have a lock on the board.
rastPort->Layer=0; // No OS clipping = more SPEED.
MaskWritePixel(rastPort,x,y) is using rastPort just like the animator is
using. This is as it should be.
So I theorize that sometimes task switching kicks in right in the middle
of a OS WritePixel() call such that WritePixel() starts out using rastPort
with a layer and ends up using a rastPort without a layer (or vice versa).
And this somehow makes the OS go insane and crash.
So how should I fix this?
A) Add an ObtainSemaphore() ReleaseSemaphore() pair to the archery code?
B) Comment out that layers disabling code in the animator task?
I am choosing option B for the following reasons:
1. I don't ever want this bug to happen again! Someday someone might code
a new routine that does writes or reads from rastPort without getting a
lock on &Board first! Then the bug will be back!
2. I don't have time to fiddle around chasing silly bugs like this so we'll
just have to settle for an animator task that is now 10% to 15% slower.
3. Now that I've implemented the fix, THAT MYSTERIOUS BLUE LINE THAT KEPT
RANDOMLY APPEARING ON THE LEFT HAND SIDE OF THE BOARD IS GONE FOREVER!
NOW FIXED!
* BUG: Strange blue line randomly appears on the left side of the board.
NOW FIXED (see above).
* PROBLEM: Using default settings the music is playing during the bonus
spell selection panel. This causes JCsound to fail. This doesn't hurt
anything but it is disconcerting to the user to see messages in the cli
window that say "ChaosDigitalSoundSubProcess failed returncode 150"
so I have now changed the bonus spell panel to not attempt to play any
sound effects if the music is playing. NOW FIXED.
* Included Xav's Abduction graphic (the one with the flying saucer). The
only trouble is that the Abduction spell doesn't really abduct anyone.
Abduction should really be renamed as BrainWashing or something.
"Abduction" should be the same as Vanish but I can't think up a way to
make it be different from Vanish. (?)
September 3, 2000:
* Included Joseph's new Eagle (2 extra frames), Skeleton (Added a few new
frames), Dragon Nest (He thought it looked to much like a friendly little
fireplace so he made it round. It is now an interdimensional "portal"),
Pegasus (1 extra frame), Crocodile (fixed the feet).
* FLAW: A Range Boosted or Aesculapiused Goblin loses some ability when
killing an Archer and picking up the bow. NOW FIXED.
September 11th, 2000:
* Included Xav's new Français setup screen I and II into the game.
* Sent v2.9d + A500 + Trumpcard 500 with 200 meg HD and 4 megs ram to
Vivian in exchange for a SCSI CD-ROM drive and 2 Amiga Active Magazines.
* FLAW: If a person doesn't have narrator.device installed then the game
won't play. I have now removed all narrator.device dependencies so this
is NOW FIXED.
* ADDED a new code module prefs.c to Load and Save user preferences in
a plain ASCII file. I just hacked and slashed sm.c into prefs.c. This
ended up still being a lot of work. Over 1200 lines of code.
September 14th, 2000:
* New menu option: "Save Prefs"
* Changed Français info panel Tirer -> Tir.
Frédéric writes:
* "If you want to read about a spell, point at it and press "q" for Query."
I let it as is, but there's something you should be aware of: in the french
keymap, I must press "a" instead of "q" to get info. But this can change also
for other french-speaking countries. What you should do is use the
keymap.library (in ROM) to revert the wanted character into a wanted
keypress, so that the letter can be correct in all keymap configurations.
JC: Ok I did this and tested it and it works. NOW FIXED.
* PROBLEM: Now that we have improved pearl.font for Chaos there can be a
problem. If a person already has the old pearl.font installed and is
using it in his workbench or CED or whatever, then it will already be
loaded. Thus when Chaos attempts to load "pearl.font" it will load
their old unimproved version since it is already in memory.
Therefore I have now renamed pearl.font -> ChaosPearl.font and
ran fixfonts on it. NOW FIXED.
* Made documentation directories. Copied the quickstarts into them.
* Added #?.prefs and Documention/ all to MakeDemoOfChaos.txt
* BUG: Justice randomly does the following:
A: Doesn't work.
B: Works
C: Works but then awards a bonus spell on a creature that isn't supposed
to give a bonus spell.
IF (cell<0 or cell>=GAMESPACE) return
cellp=&board[cell];
cMR = cellp->char_stat.MR - MD;
The above code sequence looks innocent enough. But in fact is the work
of EVIL.
It was causing all the random errors of Justice, Dark Power, Vengeance,
Exorcise etc. There is a ; missing from the end of the first line
therefore the 2nd line was never being executed. NOW FIXED.
************************************************************************
IFF Gadgets
************************************************************************
The IFF gadget loading code:
Each gadget will be an IFF brush. I must load each of these brushes into
an image struct.
1. Open the IFF-file.
2. Determine its x and y size.
3. Allocate the memory for that
4. Read it in and set up the struct Image for it.
5. Poke these values into the gadget struct.
IMAGES:
1. X
2. Check
3. Start
4. Quit
5. QuestionMark
6. EndTurn
7. RightHandSide (The texture of the right hand side of the board)
The right hand side thing is not really a gadget. Its just a brush. All
gadgets are brushes but not all brushes are gadgets.
GadgetImage[0] will be unused.
GadgetImage[1] to [7] will be used.
GadgetData[0] will be unused
GadgetData[1] to [8] will be pointers to the image data.
The data areas will each be a different size for each gadget.
So how do I handle the memory allocation and deallocation for all these
differently sized images?
A: Use AllocRemeber() (Might cause some extra memory fragmentation)
B: Use AllocPool() (I heard this was bugged on OS 3.0 but there is no
mention of any bugs in the OS 3.1 DevCD.)
C: Have another array of ints for the size of the data GadgetDataSize[0] to [7]
* I choose option C. It seems easy enough.
Sept. 17th, 2000:
I have the gadgets in but the end turn gadget and question mark gadget have
a big black box around them. There is no way to specify that color #0 (or
any other color) should be transparent. This makes the right hand side
look awful.
Possible Solutions:
A: Write a special rendering hook function for my gadgets to draw them with
the blitter in such a way as not to destroy the background. I don't
really know how to do this though.
B: Switch to using GadTools.library (I assume that gadtools gadgets can be
specified as having a transparent color 0) I don't know anything about
gadtools though.
C. Simply redo the gadgets such that they have the backdrop built into
themselves. This is the easiest thing to do. This also means that if
someone redraws the right hand side then they must also redraw the
EndTurn, QuestionMark and Mount gadgets to fit.
I will do C since I don't have to read any documentation or figure out
any paremeters or anything.
* Included Xav's new French versions of the Start and Quit gadgets.
* The game is now 99% playable in French. Everything except the menus and
docs has been translated.
* Added in those 2 gadgets for the hires screen.
* REMOVED the old hardcoded TickImage and CrossImage from Init.c/Init.h
************************************************************************
End IFF Gadgets
************************************************************************
* I antialiased Xav's new rotating Generator and included it into the game.
* Version 3.0 completed on September 20th, 2000. It contains 904 tiles.
Size of 3.0d executable is 339564 bytes.
3.0d consumes 10.3 megs of hard drive space.
* UPLOADED v3.0d to Aminet on Thursday, September 21st, 2000. My internet
account has only been giving me around 300 cps lately, but I got 1100 cps
while uploading chaos! It's a miracle!!!
September 24th, 2000: Frédéric writes:
> * I cast "stone to flesh" on one of my dark wood trees and moved it next to
> an independent ghast. However, it did not get engaged to the ghast and I
> could not attack it on the same turn.
I could not exactly duplicate this bug. When I moved my Dark Wood next
to any enemy it got engaged, however when I clicked on the enemy to attack
it, no sound was made and the graphical attack effect was not shown.
The attack actually did happen though. The enemy lost the appropriate
2 hit points.
This was caused by code that suppressed the attack sounds & gfx for the Dark
Wood (so as not to get boring and annoying when its SpecialCombat attacks 8
adjacent enemies). I tweaked the code to only suppress the combat sound
and graphical effect when the Dark Wood is inanimate. NOW FIXED.
* INTEGRATED Frédéric's improved asm music routines into the game. The
music system now resides in the dir AsmMusicSystem/
I didn't know what to do with the file proplayer.a so I just left
it out. Everything seems to work ok but the subsong bug is still there.
I did a simple memory leak test and a simple mungwall hit test.
Everything seems ok. We can now allegedly play MMD2 songs from Octamed
Sound Studio Professional from 1 to 64 channels.
* FLAW: When you select a spell from your list, the erased area is 1 pixel
to big. NOW FIXED.
* ADDED part of the code to support PlayByEmail.
-----------------------------------------------------------------------
Problems caused by a bug in RestoreCellWizard() (It wasn't doing a BackUp()
it was just overwriting whatever was there)
* When the mount of a wizard is killed, it leaves no corpse behind.
Tested and works perfectly. NOW FIXED.
* When a wizard dismounts something onto a scroll, the scroll is destroyed.
NOW FIXED.
* Above fix causes collapsing meditations to reappear once the wizard moves
off of them. NOW FIXED.
-------------------------------------------------------------------------
Frédéric bug reports for v3.0 +++++++++++++++++++++++++++++++++++++++++++
> * I had saved the preferences with Music off, but when I restarted the game,
> the music was switched back on. However, the menu "Music" was unchecked.
> When I selected it, another module was restarted, then I could switch the
> music off by reselecting the item. Seems you forgot to read this preference
> item before starting the music.
NOW FIXED.
> * The left amiga key acts as "q". Actually, I guess every keypress of a
> qualifier triggers the very last action done on the keyboard.
This was caused by the fact that MapRawKey() maps qualifier keys as
nothing. That is it doesn't even put a 0 into the buffer. So the buffer
was left holding whatever key was pressed last. NOW FIXED.
END Frédéric bug reports for v3.0 ++++++++++++++++++++++++++++++++++++++++
WARNING: You should not use illegal hacks of the "Automatically activate
any screen that is ever in front" variety. This is simply improper and
just won't do. Hacks like this will not crash Chaos but they will cause it
to behave in an annoying manner since hacks of this nature will constantly
activate the WRONG screen. Do not use "AutoActivate FrontMost Screen" hacks.
Failure to heed the above warning may cause the screen scrolling to stop
working. This will prevent you from reading certain lengthy spell
descriptions.
MCP has such a hack. It should be turned off when playing Chaos.
* FIXED that rawkey problem on the 2nd creature info panel that prevented
screen grabbing! (Pressing ANY key at all was clearing the screen).
NOW FIXED.
* STUPID: Computer wizards senselessly cast Dark Wood trees adjacent to
themselves. I have now implemented more advanced AI for use with this
particular spell so this is NOW FIXED.
* Several new predicates to support the new AI:
int AdjacentFriendlies(int source, int cell);
int AdjacentEnemyUndeads(int source, int cell);
int AdjacentFriendlyUndeads(int source, int cell);
int AdjacentEnemyWizards(int source, int cell);
int AdjacentFriendlyWizards(int source, int cell);
int AdjacentEnemyUndeadWizards(int source, int cell);
int AdjacentFriendlyUndeadWizards(int source, int cell);
* INTERLACE PROBLEM: Sometimes AGA users complain that certain chaos
screens are in interlace. They want to make use of their AGA chips
+ their multisync monitors to produce a 100% solid flickerfree display.
So I have now added a new cli startup option -d to force chaos to open
all its screens in doublepal mode. I also added a new startup script and
icon so chaos can easily be started in DoublePal mode from now on.
DoublePal modes are noninterlaced and flicker free. NOW FIXED.
* ADDED Polski, Norsk, Svenska and Finnish to the language menu.
Complete info on Polish fonts and charsets is at
Aminet:docs/misc/PolishCharset.lha
--------------------------------------------------------------------------
September 27th, 2000: I _finally_ got a finished polski.catalog from Artur.
Here are the problems:
Scavenge -> Padlinoûerca is too long. Can you think of a shorter word?
Scierwojad, Padlinozerca, Sëp (bird that eats dead animals), Mordobocie.
Padlinozercy (plural noun),
Fei says: Zerowac with dotted Z is a verb that is what I want.
Ranged Combat -> Walka Na Dystans is too long. What is polski for "Shoot"?
Maybe "Shoot"->Strzelac or Strzal or Strzelanina would work better?
Or perhaps WalkaNaDystans?
Strzal for Shoot is what fei says to do.
Magic Resistance -> Odpornoôê Magiczna is too long. How about
"Magic Resist" or "Resist Magic"? ??
Przeciwmagia=AntiMagic, Odpornosc na magie
Odpornosc mag. is the way fei says to do it.
---------------------------------------------------------------------------
* ADDED new code to make the top half of the 2nd creature info panel fully
stringwidth sensitive. (I had already done this with the bottom half).
This allows the Polski translations to fit without overlapping. DONE.
* ADDED new code to make the text on the score screens fully stringwidth
sensitive. This allows the polski translations to fit without overlapping.
The numeric columns are unchanged. Seems to work ok.
* Implement translated menus:
1. Make the strings into the catalog file and defines.h
2. Change ChangeLanguage() to put in the correct text via Message(M_?) into
each of the menu fields.
3. Calculate the length of the menu name and of the longest string in the
menu.
The Intuition menus are now fully international and automatically adjust
to the length of the strings in the menus. ALL DONE
* Added code to center the translated strings of the demo over screen. DONE.
* Fixed spell descriptions for Hydra, Flood Shield, Marid and Protection.
***********************************************************************
THE LINKER HAS ATTACKED ME AGAIN!!!
***********************************************************************
SLINK WITH temp_smk.tmp
Slink - Version 6.58
Copyright (c) 1988-1995 SAS Institute, Inc. All Rights Reserved.
Error 502: _sprintf symbol - Distance for Reloc16 > 32768
First Reference in Unit cast.c at offset 00003a04 in file 'cast.o'
To Unit sprintf.c at offset 00001690 in file 'LIB:scm.lib'
Caused by line 1929 in file cast.c
I added 200 lines of new code to cast.c today. And this error started
happening.
I read the docs. They say to compile the file with code=far. But I
already do that. I got this same error or a very similar one a few months
ago so I had to add code=far to the compilation of cast.c.
The docs also say that you can "declare the function to be far". But
changing stdio.h prototype of sprintf sounds like a very bad idea.
So I tried to compile the whole thing with code=far. I changed stdops to
include code=far so that ALL modules would be compiled with cod=far.
Then I did smake clean smake. It all had no effect.
The docs say scm.lib is a lib of floating point stuff. But I don't do any
sprintf floats in cast.c so I just totally don't understand this whole
entire thing. The sprintfs in cast.c are all %s or %d.
So what am I supposed to do????
As far as I am concerned this must be a bug in the compiler or linker. I
am compiling cast.c with code=far therefore there should simply not be any
16-bit branches in it. Therefore I should not ever get any 16-bit branch
errors.
Solution: Remove a bunch of code out of cast.c to make the code smaller.
I am transferring all routines having to do with scoring and sorting cells
for intelligent pit casting purposes into a new module IntelligentPitCast.c
This has the code for intelligent Pit, Magic Glass and Weak Wall casting.
This problem will probably resurface the next time I add in a bunch of new
spells.
Oh great! Now the compiler says I have conflict between 2 variables!
I have
static int id; in cast.c
static UWORD id; in IntelligentPitCast.c
and it says these vars are conflicting with each other!!!
This is scary! They are supposed to be 2 completely different vars,
each local to their own file!
newl tested this same type of thing on gcc and it worked perfectly,
exactly the way that it should. The 2 id vars were each completely
different and independent of each other and it compiled perfectly.
That's 2 major SASC bugs in 1 week! :(
Ok I have hacked and slashed my IntelligentPitCast.c code to only share
the vars that are absolutely needed in order to work around this evil bug.
But this could cause other very serious problems now, or in the future
(when I add another intelligence module) :(
Arrgh! Now I'm getting multiply defined symbols. It says every function
in IntelligentPitCast.c is multiply defined. Ok this is because I had in
cast.c:
#include "IntelligentPitCast.c"
instead of the correct
#include "IntelligentPitCast.h"
So this variable conflict wasn't a bug after all!
But that Reloc16 > 32768 thing is still a bug in the compiler.
***********************************************************************
END THE LINKER HAS ATTACKED ME AGAIN!!!
***********************************************************************
* Installed the new HUPL versions of all the fonts. These are the standard
gamefonts modified by Attila the Hun to have all Hungarian chars in the
proper places and then modified by Frédéric Delacroix to contain all Polish
chars in the proper places. I then had Sau test the ChaosPearlHUPL font on
his Amiga in Hungary using a Hungarian keymap and he reports all chars are
there and everything is ok.
* New function to support the new AI: FirstAdjacentHumanAlly()
October 7th, 2000:
* FLAW: Deutsch.catalog on 2nd scroll info panel goes off the right edge of
the screen. Everything was working great with the English, Français and
Polski catalogs But when I got the Deutsch.catalog it was going off the
right-hand edge of the 2nd scroll info panel. I have now changed that
panel so that the left column is right against the left edge and the right
column is right against the right edge.
* Goblin Bomb now picks up bows just like a regular Goblin.
October 8th 2000:
* Compiled v3.01d for Robin. The main executable is 349900 bytes!
######################### GOBLIN BOMB VOTING ##################################
Vote: If you shoot a scroll of a Goblin Bomb, do you want it to explode?
You may vote for it to explode (+1 point)
You may vote against it to explode (-1 point)
Or any number in between.
James: +.25
Sean: +.8
Joseph: -1
Zoltan: -1
Frédéric: -.75
Xavier: -.25
JJ: -1
Total: -2.95
* Changed/fixed Goblin Bomb to no longer explode when shot. October 11, 2000
* Also fixed it so that:
* Shooting a scroll of an Earthquake, Generator, Stone Golem or Stone Giant
no longer shakes the screen.
* Shooting a scroll of a Hidden Horror no longer causes a Red Dragon to
appear.
* Shooting a scroll of an Elemental no longer causes it to become its
Elemental Form (water, fire, tempest, earthquake)
####################### END GOBLIN BOMB VOTING ################################
**************************************************************************
BEGIN Ruthlessness Mode
**************************************************************************
When Ruthlessness mode is activated computer players will:
1. Cast pits, magic glass, walls, rocks and miner willy more intelligently
and aggressively.
2. If they are an arborist they will cast shadow wood and dark wood trees
in a more aggressive and intelligent manner.
3. Whenever a creature is engaged it will always attack the strongest
creature that it can acutally kill. If it cannot make a kill then it
will attack whichever enemy it feels is the most dangerous.
4. A shooting creature will always attempt to shoot the strongest creature
that it can actually kill. If it cannot make a kill then it will shoot
whatever enemy it feels is the most dangerous. They never try to
shoot a wizard who is inulnerable or has a reflector.
5. A nonengaged ground creature will always check first if there is a path
to any enemy wizard that it can kill. If it cannot kill any enemy wizard
then it will check if there is a path to any favorite-food creature that
it can kill. If it cannot kill its favorite food then it will check
if there is a path to any bonus-spell creature that it can kill.
* Implemented new AI code for ruthlessness mode. Now ruthless computer
players will cast pits, magic glass, walls, rocks, miner willy, shadow wood
and dark wood trees in a much more intelligent and aggressive manner.
This took 600+ lines of code and quite a lot of time. It added 7k+ to the
size of the executable.
* Conducted various tests of the new ruthless casting code. Everything
seems to work ok.
* Implemented new AI code for ruthlessness mode. Now computer shooters
shoot the strongest thing that they can kill. If there is a tie then they
shoot the most dangerous opponent. Wizards will not shoot and kill a
creature protected by Eye for an Eye.
* Conducted various tests of the new shooting code. Seems to work ok.
* Implemented new AI code for ruthlessness mode. Now engaged computer
creatures attack the strongest thing they can kill. If there is a tie then
they attack the most dangerous opponent. Wizards will not attack and kill
a creature protected by Eye for an Eye.
* Conducted various tests of the new engaged attacking code. Seems to work ok.
* Implemented new AI code for ruthlessness mode: flying nonengaged creatures
attack the strongest thing they can kill. If they can't kill anything then
they attack the most dangerous thing they can hit. If there is nothing
they can hit from their current position then they fall back to the old
movement routine.
* Conducted various tests of the new nonengaged flying attacking code.
Seems to work ok.
Implement ground-based nonengaged creatures seek a good kill. (wizard,
favorite food or bonus spell creature). If they can't do any of those
things then they just fall back to the old movement routine.
I spent 2 hours thinking up an algorythm to allow creatures to find their
away around ANY set of obstacles to reach a desired goal. I came up with a
recursive algorythm that would be ok for up to 6 movement points but it
would take several hours in the worst-cast scenario of 15 movement points
on an empty board on a 25 Mhz 030
So then I spent 1 hour thinking up a split "search from both ends" strategy
which would do 2 6 mp recursive searches. One from the source and one from
the destination. This would have allowed all paths up to 12 movement
points to be determined and would only take a few seconds in the worst-case
scenario. Actually, I just realized this totally would not work at all
because there can be multiple desired destinations... so it would only
work if there was only 1 desired destination.
With optimizations for not retracing steps and not taking paths for which a
shorter route already existed I could do 7 mp search with no problem.
Then I spent 2 hours coding the above routine and I began to
realize how amazingly inefficient a recursive search was. yuk...
So then I spent 3 more hours inventing a new search algorythm that is not
recursive and is amazingly fast! It should be able to determine the BEST
path to all points on the board in around .025 seconds on 25 Mhz 030. If
the board was 4x larger than it currently is then it should take about .1
seconds. 6 more hours of coding and it was ready to be tested.
A couple of days later: well I had to make some adjustments and things to
make everything work within the realm of Chaos. But now that it is done,
IT IS TOTALLY AWESOME! I built some complicated mazes and then pressed the
"m" key and it correctly showed all the places I could and could not move
to! I kept randomly deleting pieces of walls and putting new walls elsewhere
in an attempt to confuse it but it worked every time! WAY COOL!
I had always been planning on optimizing the C code to make it go faster,
or to rewrite it in asm if needed but it goes SUPER FAST on the very first
try! So there is really no reason to optimize it at the present time.
It is fundamentally a very efficient algorythm.
I can now theoretically program computer creatures to find a path to any
desired goal. However each goal that is searched for will have to be
specially programmed in.
This algorythm only finds clear paths to every square on the board.
This algorythm does not currently try to calculate any sort of "hack your
way through these certain barriers to reach your goal" type of stuff.
This algorythm takes into account the fact that once you are engaged you
can attack any adjacent square, even if you only have .1 movement points
left.
* BUG: There has always been a bug in the game whereby if you move some
squares and then have only .5 to .9 movement points left it lets you move
another full square! This is cheating! It takes 1 whole movement point to
move in a straight line and 1.4142 movement points to move diagonally!
I have now changed the inappropriate occurrences of "0.5" in move.c and
cmove.c to say "1.0" now. However, you can still cheat and step diagonally
on your last move when you only have 1 movement point left. SORT OF FIXED.
I will work out a way to fix this last flaw later. Later: ok the
movement system now works exactly the way it should. This is all 100%
NOW FIXED.
* IMPROVED cmovenonengaged() to take an extra path parameter. When this
parameter is not NULL, the movement information comes from the path rather
than the ChooseDestination() function. This way anytime I have calculated
a path for a creature to follow I just keep calling cmovenonengaged() to
make it follow the path. This way I am using the EXACT same movement code
for both normal movement and path-following movement. So everything
should always work perfectly.
* Ok, I've got the path code in and working and computer-controlled
creatures can now follow complicated paths to their destination. As I
watched a 14 movement-point Hydra navigate a complicated obstacle course on
his way to kill an a Generator I noticed the following 2 bugs in the old
original computer movement routine:
* BUG: The computer movement routine deducts 2 movement points for each
diagonal move instead of the correct 1.4142! This applies to computer
creatures AND computer wizards! NOW FIXED.
* BUG: The WRONG movement point value is shown all the time. It was taking
the actual movement points left and rounding them DOWN to the nearest lower
integer. NOW FIXED.
* Line 58 and 59 in the catalog file are no longer used. They only showed
movement points as (wrong) integers. Line 91 is now used instead.
* Added code so that nonengaged exposed wizards will run into an unoccupied
meditation if possible.
* Modified "m" key to work, even in the middle of a creature's movement!
I've been wanting this feature for years! I finally did it! And now
that I've fixed all those 10 year old bugs in the move routines the m-key
highlighted squares now agree perfectly with the printed numerical value at
the bottom of the screen and with how far you _actually_ get to move your
unit.
* FIXED FindAllPaths() to handle mounts + level 2 mounts when the SourceCell
contains an exposed wizard. (It already handled meditations). DONE.
* FIXED "m" key ground movement to handle mounts and level2 mounts + ride.
* FIXED "m" key flying movement! Just use the old code. DONE.
(FindAllPaths is only for ground movement.)
* FIXED "m" key flying movement to take into account
"WillIGetEngagedIfIMoveThere". This way cells which you cannot directly
fly to, but you can fly next to them, become engaged and then attack them
will now be correctly highlighted.
* Modified io.c to load/save Ruthlessness var finally.
At the beginning of the Ruthlessness upgrade cmove.c was 24.5k in size.
Now it is 61.5k!
**************************************************************************
END Ruthlessness Mode
**************************************************************************
Robin Schmidt writes:
> The Pyrohydra has combat 15 and ranged combat 5.
> But the discription tells me that the breath fire of the pyrohydra is one
> of the strongest. I suppose you swaped the numbers?
Wow! What a cool bug you found! I swapped the numbers back around.
NOW FIXED.
> 1. When questioning a cloaked object, the German text is too long.
> We need a line feed + carriage return 8-)
It took me 90 minutes to hack and slash an AntiAliasWriteTextLength()
function together for this purpose. NOW FIXED.
> Just had a game: I played with four wizards in my team against four computer
> wizards and four generators. Everything enemy to me is destroyed. I attached
> the savegame. When I cast the seperation spell the fight can go on, but why
> doesn't the game finish now? My team has won!
Team/Alliances and ending the game.
End of Game Check will do:
IF (everyone alive on the board is on the same team) THEN
IF (all of those people were ORIGINALLY on the same team at the start of the game) THEN
(The game is over, that team wins!)
ELSE
? FD says to do nothing because this can make the game last a very
long time and force a player to sacrifice multiple dragons via
Justice/DarkPower/Vengeance in order to get bonus spells that allow
for killing an unwanted allied wizard.
END_IF
END_IF
* Above code implemented.
* BUG: Team[] gets saved and loaded with the savegame file but not
TeamSettings[]! I have now fixed this, this means the savegame format
has changed again. I am deleting all my old saved games and I am
converting all the levels to the new format. NOW FIXED.
> 2. The Nightmare has a combar value of 1? I think it should be higher, for
> 'it's feet are burning hot' or something like that.
I just deleted the sentence
"They attack with their hooves which are burning hot."
from the spell description so this is NOW FIXED.
Of course now I will have to convince all the translators around the world
to upgrade to the new spell description... 8/
> 3. I cast the Dead
> Revenge spell on my wizard and he is killed. Now the game asks if I really
> want to play on or start another game ('Do you really want to start a new
> game?')! I say no and see the generator - MY generator. But my old monsters
> are asleep, I cannot do anything. And with the end of the next turn the game
> asks again: Do you want to go on? Nay, me says and lo! there my generator
> produces a Goblin for me. I can DO something - I can MOVE. But anyway the
> game asks me if I want to play another game. Then I reached turn 24 and
> everything was out - strange tale, isn't it...;-)
hahahahheheehheha this sounds very funny! 8)
Here's the deal: When all human wizards are dead the game is supposed to be
over.
Dead Revenge
lets you have some small amount of influence in the game so long as there
are other human players in the game. This presumably allows you to take
some revenge on the human wizard who killed you so that (hopefully) you can
weaken him and make some other human player or computer player or even the
independents win.
You are the very first player (besides myself) to test the new Dead Revenge
spell. For years Dead Revenge didn't let you take ANY revenge at all! It
just let you die and then gave the _independents_ a new generator in your
place! If you died at the hands of the independents then this was doubly
unjust!
If you aren't going to play Chaos with all those visitors at your house
then you could try playing where you yourself control 2 different wizards
on a team against 4 computer wizards on a team. In such a game the Dead
Revenge spell would work as you would like it too. (Although there is a
theory espoused by certain Chaos Players that says something about it being
a bad idea to let your wizard die in the first place 8)
Btw: Frédéric wants me to somehow rig the replacement generator to have a
chance of generating your wizard back into the game. I haven't really
worked out how that would work yet.... I am thinking that after X number
of turns it would automatically generate your wizard back into the game.
I'm thinking a number like X=20 would work well. I think this would be
unbelievably cool in a large multiplayer game.
> Another question: When calling the About window it says: 'Return Of The
> Wizards'? Why?
I asked myself that same question the first time I saw it.
The answer is:
It is a reference to the facts that:
1. There were powerful wizards in ancient times, but their knowledge was
mostly lost over time.
2. The game takes place in the far flung future when scientists have
rediscovered and reinvented the magical powers that were once commonplace
in Atlantis, ancient Egypt and other lost civilizations.
Didn't you ever wonder how the Pyramids were built? Well its pretty darn
easy when you have complete control over a Brontasaurus. Whole teams of
Brontasauri even.
But dinosaurs really eat a lot... and they severely overgrazed the land...
giant dust storms ensued... the entire area turned into a desert. A
terrible ecological disaster from which they still have not recovered 5000
years later.
It says "Battle of the Wizards" in some places and "Return of the Wizards"
in other places. I was thinking of having it say "Wizard Wars" or
"Strategy Game of the Century" or ? But it seems ok like it is.
October 19, 2000:
* CHANGED spell descriptions of: Bat, Nightmare, Virtue.
Sent them to FD and SF. Included new FD French versions.
* ADDED code to keep track of total time spent playing chaos and total
number of turns played. Now I just have to decide where I will display
this information.
October 20, 2000:
* Sent v3.01 to FD for betatesting.
* INCREASED the code to keep track of total time spent playing chaos to
keep seperate totals for each of the 8 players + the independents.
* Added code to switch to the HUPL font when selecting Hungarian or Polish
from the Language menu.
* Chaos release executable is now 368704 bytes in size.
* The toe of the Babboon is all messed up. NOW FIXED. + I drew some blood
on the dead body.
* Pieces of the Skeleton animation were not antialiased. NOW FIXED.
* Amphisbaena is all messed up! NOW FIXED.
********************* BEGIN Robin Stuff *******************************
Robin writes:
> 4. I think the Goblin Bomb makes it too easy to kill generators. Try it:
> Place a Goblin Bomb next to a generator. Shoot at it until it dies.
> Destroy the generator with any adjectant creature (even an orc).
> It's far too easy!?!
Well in a "real" game with say 8 generators it isn't so easy. I mean,
first you have to _get_ the goblin bomb next to a generator. This is easy
if your wizard is standing next to a generator but if you are standing next
to a generator in a normal game then you are probably going to get killed
very soon. Perhaps this is why you like Dead Revenge so much? 8) hehehe
Ok so if you are a safe distance away then you have to walk your
Goblin Bomb up to the generator and it will be very challenging to get
him there without some independents killing him prematurely.
Also, I have found that it is quite challenging to get a Goblin Bomb into
position without at least taking some damage onto my own creatures.
And lets say that you are such a good tactician that none of what I have
just said applies to you. Well its ok for it to be "easy" to kill 1 or 2
generators in a game. Its the only way to survive when playing against 16
generators!
And lots of times I've had Goblin Bombs but no shooting creatures. So I
get my Goblin Bomb into position and then some bozo comes along and kills
him! Then they kill the generator! So I don't get any bonus spells for
it!
> My dear, you talk too much. But what is most anoying - you are right. So we
> leave the topic.
> Now my great BUG!!!:
> Yesterday (or tomorrow, don't know) I got the Touch Of GOD (nice one 8-)! So
> I made my Wood Elf a godlike creature. A when it moved around killing here
> killig there killing everywhere it suddenly was promoted to a Dread Elf
> (ooohh, how dreadful)! But then I saw that his life force was decreased, and
> so were Magical Resistance and healing capabilities! That's no good, my
> dear. And I presume this 'feature' can be used with any promotable creature
> that is under the Armour and Protection spells. No other values were changed
> though, so my dread elf was still of much use to me...
Ok I read over the code that controls this and I see no possible way this
could happen. All the stats are promoted the same way so they should
either all promote correctly or none of them should promote correctly.
So I played a test game and cast Touch of God onto my Wood Elf. On the 4th
kill he was promoted to a Dread Elf. The only thing wrong with him was
that his manuverability didn't promote right (I forgot to promote that stat
in the code). So the Manuverability stat promotion is NOW FIXED.
The only thing I can figure is that your Dread Elf was attacked by a
creature (while you weren't looking) that caused the leben damage.
Possibly your Dread Elf was attacked by something holding a Poison Dagger,
that would mess up your leben recovery rate.
And that you just mixed up manuverability and magic resistance.
> NO! There
> was another thing I forgot to tell you: The Leben (you have to write it with
> a capital letter in German 'cause it's a noun...) value was increased by
> using the Armour spell (which was called by the Touch Of God, I think), and
> then, when I call the info panel, I see from the pictures, what happened to
> my elf (there were the Red Cross, the Shield, the Range Boost Arrow and...
> and the Armour). After he was promoted, there wasn't any Armour sign any
> more! Im totally sure about that!
The Armor sybmol is algorythmically generated each time you look at the
info panel. If your life is 15 points higher than your normal maximum then
it draws the Armor symbol. Several other symbols work in a similar
fashion.
So your Touched by God Wood Elf had probably taken a few hits during his
conquests right?
Lets say he had taken a few hits and was down to only 50 life points.
Well when he got promoted to a Dread Elf his normal life would be 39 life
points but he still keeps his 50. 50 is not 15 higher than 39 so it would
stop drawing the Armor symbol.
Dread Elves come with 39 life points built-in. So for it to draw the Armor
symbol would require him to have 54 life points or more.
There are still lots of strange things in the game that you haven't found
yet. And some secret things too.
> I just found one: I made my Magic Wood
> walk via StoneToFlesh. I boosted it a little bit with some Combat training
> and tried to attack the next wizard. Well it worked fine, but then the
> wizard just entered my Magic Wood and disappeared! I could still move my
> Wood and attack, but the wizard remained in it. Some turns later my wood was
> destroyed from within by the evil wizard and he got a spell. :-(
Hehehehe
*************** END Robin Stuff ******************************************
*************** BEGIN Frédéric Stuff *************************************
FD Writes:
> I saw once (I think it was when a wizard had just been killed) a string
> like "Movement points= -98.50). I can't remember the exact circumstance
> unfortunately.
I looked over the code and I only saw 1 place where this could be
theoretically possible so I rewrote that piece of code.
ALLEGEDLY NOW FIXED.
> * Something has changed about shadow wood. It seems to me that they don't
> attack anymore when computer-controlled.
The code used to erroneously say (This used to let people cheat and move 1
extra square sometimes.)
DO_WHILE (moveleft >= 0.5)
So I erroneously changed it to:
DO_WHILE (moveleft > 1.0)
Which prevents things with exactly 1 movement point from moving.
Now I changed it to the proper:
DO_WHILE (moveleft >= 1.0)
NOW FIXED.
> * I cast alter reality on a wizard's mount and it was turned into a
> goblin bomb. However, the goblin bomb did not explode when I killed
> it. It should explode, but should the riding wizard be harmed too ? I
> think so but ?
That's hilarious! You come up with the weirdest stuff! :)
1. Goblin Bombs have never done the explosion effect on empty cells.
I did not attempt to change this. But someday I would like to have just
*1* really BIG, 9-tile big (3x3) nuclear explosion animation that we can
use as the cell effect animation for this effect. Or actually it could be
ANY animated explosion whatsoever.
2. With clever rewriting of the Reinstate() function I was able to make
mounted Goblin Bombs explode as usual. NOW FIXED.
3. Goblin Bombs have never harmed the cell that they are in. I have now
hacked in some extra code so that they now damage a mounted wizard.
Same thing for the Volcano. NOW FIXED.
****************** END Frédréric stuff *************************************
October 26, 2000: Sent a new v3.01 to FD for betatesting the AI.
Executable filesize = 368892.
Sent a new v3.01 to SAI for betatesting the AI.
Executable filesize = 386456 This means the level editing code is 17564
bytes in size.
=========================================================================
FD Writes:
> * I vanished a horse into the future, and it reappeared some turns later in
You vanished a horse?? Was this a really BIG, bad, scary horse or
something? :)
> the rightmost column. But the drawn area was 1 pixel too wide, damaging the
> spell selection graphics. This was refreshed very quickly though. Actually,
> this seems to happen everytime something is drawn in the last column.
I think it only happens during the CellEffects TELEPORTIN and TELEPORTOUT.
NOW FIXED.
> * When a creature gets promoted, its manoeuvrability recovery is reset, not
> kept.
NOW FIXED.
==========================================================================
October 29th, 2000: I voted straight Libertarian. I also voted against
the lame "Arena Proposal" to give millions of tax dollars to the Houston
Rockets & Comets basketball teams.
-----------------------------------------------------------------------
FD Writes:
> * A sleeping ghoul is still animated and scavenging. I can't remember
> exactly how it happened, but this could be due to impurities.
NOW FIXED.
> * If a computer wizard has a solar, then the solar does not move.
NOW FIXED.
> * I noticed that since you introduced the new dead revenge, when a creature
> changes side to that of a dead wizard (haunt or impurities), this wizard
> gains control of it, even though he did not cast dead revenge when he was
> alive. Is it a wanted effect ?
Yes, this is a wanted effect. The new rule of the game is that if a
wizard owns things on the board that are not asleep or dead or a scroll
then he gets to use them as usual. Even if the wizard himself is dead.
This is what allows Dead Revenge to be such a useful spell now.
> * Unless I missed something, when I cast a vortex on a corpse, the corpse is
> destroyed when the vortex moves. It should either be vanished, or left
> behind.
This is a game secret. Just because the corpse is not there when the
vortex moves does not mean it is destroyed. Can you figure out where the
corpse has gone?
> * In one of the first emails we exchanged, you told me you'd change the
> magic knife to improve combat by only 2 points instead of three so that it
> is really different from magic sword. It seems to me it still adds 3 points.
Someone must have cast vodka on you again. You are imagining things again
:)
Wait till you sober up then try casting Magic Knife again and you'll see
that it works properly. :)
> * It would be nice, in the bonus panel, if the number of spells to pick was
> decreased each time I pick a spell.
NOW DONE.
> * During spell selection, when I press "c", it shows me where I can cast the
> spell under the mouse pointer. But then I must click elsewhere to be able to
> press "c" again on another spell. It would be nice if we could press "c" on
> different spells without having to click in between.
This is a problem with _all_ keypresses, not just the "c" key. Originally
I programmed all keypresses to work exactly the way you describe. Then one
day Sean changed it. I didn't like it but I assumed he had a good reason
for it so I decided not to mess with it until someone complained about it.
NOW FIXED.
END FD Writes.
------------------------------------------------------------------------
* November 1, 2000: Sent v3.01d (19) to Artur Chlebek for testing the Polski
translation of the .catalog file and the HUPL fonts and the Screens/Polski/
The executable was 369192 bytes.
* Included Stephen's Magyar spell descriptions A-Z. They still need
to be spell-checked.
* Robin wants a special version with a time delay on what the wizards are
saying/thinking during their spell-selection AI. Sent v3.01d (24) specially
modified to him.
November 2, 2000:
Artur Writes:
> It seems that there is something wrong with support for HUPL fonts - I
> checked them in DPaint and all polish chars are OK and in proper
> "places". But Chaos doesn't seem to use them - only script font
> (ChaosHUPL) seems to be used when proper option is enabled. All other
> fonts (ChaosCalligraphy & ChaosPearl) seems to be used in original
> versions - not their HUPL equivalents. :/
>
>> Can you give me an example string where the char is wrong and I will
>> check this.
>
> /"Name/ wybierz zakl_e_cie." (polish equivalent of "/Name/ select your
> spell.") - underlined "e" has some 2 dots on the top of it, while it
> should be a mix of "e" & ",".
The problem was that I closed the old fonts and opened all the new ones
correctly but that is not enough. The fonts must be plugged into every
rastport and screen in the game. NOW FIXED.
* Sent a new v3.01 (20) to Artur for testing the fixed HUPL font support.
executable filesize = 369668.
* FLAW: In Ruthlessness mode, flying creatures seem to take about 6x longer
to move than in regular mode. This is noticeable on my 25Mhz 030 but
perhaps not noticeable on faster machines. NOW FIXED.
* FLAW: The "m" key can take up to 1/3 of a second. The above fix now
makes the "m" key around 10x as fast (in other words, back to being as
fast as it was supposed to be).
* FLAW: Computer creatures in Ruthlessness mode take up to 6x longer to
decide who to shoot. NOW FIXED.
FD Writes:
> * A (allied) computer wizard cast 3 pits around a generator in a corner. He
> had 5 pits left to cast, and he could do so around a generator on a border,
> but he chose to cancel the spell.
He didn't actually cancel the spell. He cast the wall pieces into
various parts of your computer's memory :) This triggered jillions of
enforcer hits on my machine. This bug happened when a computer player
tried to surround something that was on the edge of the map.
ALL NOW FIXED.
While watching the computer cast Weak Walls in FD's supplied autosave, at
first I thought that the computer was casting them a bit strangely. He
could have cast just *1* pit into the upper left corner and that would have
completely blocked off 1 generator.
But then I carefully examined what the computer player did and I realized
that _EVERY_ wall that he cast blocked off a generator! One of the walls
even blocked off *2* generators! And all the generators that he blocked
were closer to him than that obvious one in the corner! So he was actually
being rather intelligent about the whole thing.
> * When Virtue kills a bonus creature (white dragon, stone golem etc), no
> bonus spell is awarded.
NOW FIXED. Btw: There are only 3 bonus spell creatures that Virtue
currently kills: White Dragon, Stone Golem and Air Elemental.
* FLAW: No points are awarded for killing creatures with Virtue. NOW FIXED.
> * An independent red dragon was engaged to one of my undead inanimages, but
> he was also adjacent to my dragon nest, which was the only object he could
> attack. However, he did not attack the dragon nest, he just shot it. This
> makes me think he tried to attack the undead inanimage, which is stupid
> since the dragon is intelligent enough to see it's an undead.
This is a flaw that has always existed. NOW FIXED in both normal mode
and Ruthlessness mode.
> * My wizard just vanished because of impurities ! First time I see this !
Actually the line of code that allowed impurities to vanish things was
commented out for some reason. I have just now reinstated it.
> Actually, he was vanished by an independent chronomancer.
HOORAY for the Chronomancer!!!!! He actually did something useful! He
vanished your most valuable asset!
> The trouble is
> that 1) he has not reappeared for a very very long time. I guess this is
> because there are no empty cells on the board. They all have at least a
> corpse. 2) I don't have access to the menues to quit the game 3) What if the
> board was full of independents ? The game would never end and I would never
> get the chance to select a menu !
>
> * I'm now on turn 148 and my wizard still hasn't reappeared. He was vanished
> around turn 80 ! I'm including the autosave. I think this is because the
> world is full of corpses. The vanished objects should be given a chance to
> reappear on a corpse after, say, 10 turns, or in place of another (random)
> object that would be vanished in turn.
Ok I have investigated the WarpIn() code that controls the reappearance of
warped creatures and yes, indeed your problem was caused by all those
corpses. Here is how the code worked:
After WARPTURNS have passed, each turn try ONCE to reappear the creature
onto the board. This was done by randomly selecting a square on the board.
If the square is not TOTALLY EMPTY then too bad for you. You don't get
another chance to reappear until the next turn.
So in your game if there were only 5 completely empty squares on the board
then you would have only 5 chances out of 238 of reappearing each turn.
Ok, I have now completely rewritten WarpIn() to do the following:
After WARPCOUNT turns have passed then the object in question WILL reappear
randomly onto some completely empty square. If there are no completely
empty squares then the object WILL randomly reappear on top of some corpse,
thus destroying the corpse. If there are no corpses anywhere on the board
then some random thing will be WarpOut()'ed then the object in question
will be WarpIn()'ed to that now empty square.
I tested this new code on FD's supplied savegame. NOW FIXED.
> * When a creature which has +4 scavenging and only 1 point to heal, it's
> still displaying life +4.
I have adjusted it to show the amount that it actually scavenges.
Tested and works perfectly. NOW FIXED.
While testing the new scavenging code I was playing a little test game.
A Goblin Bomb popped out of an independent generator. So I was like
"Cool! I'm gonna kill it then kill the generator!" Only 1 problem, I only
had 2 creatures. My Goblin and Gorilla were close to the Goblin Bomb, my
Wizard was 4 squares away. I had no shooters, no flyers and no creatures
that move more than 1 square on my list. So I kept casting various Goblins
and Gorillas and as they marched up to the Goblin Bomb to kill it they
would get blown away by the independent Ogre Mage who had clear and easy
shots on anything between my wizard and the generator. Ok so this was
hopeless for the next few turns. Then suddenly I got a spell that I never
use: Request! I carefully analyzed everything on my list... I had a LOT of
spells that are better than request. I usually just discard Request. But
I _REALLY_ needed a shooter or a flying creature or even just a reasonably
fast creature like a Centaur or Unicorn. So I prayed and prayed for
something along those lines and then cast my Request.
> What creature did you get ?
If I would have got a Vulture, Eagle, Floating Eye, Unicorn, Centaur,
Bolter, Elephant, any form of cat, or any of a number of other creatures
then I could have killed the generator on that turn. But nooooo... I got a
Ghoul. Luckily Ghouls are undead so that it could survive the 3 or 4
squares he had to walk from my wizard to the Goblin Bomb + Generator. So 3
or 4 turns later I was able to kill the Goblin Bomb and Generator.
So the moral of the story is: Even spells that one never uses, _can_ be
vital in certain rare situations.
* BUG: Using the "m" key on an engaged creature sometimes produces somewhat
wrong results. NOW FIXED.
Robin Writes:
> I tried the Brustroem's Browser spell.
> I used the spell and look into the different spell books. But when I
> wanted to choose a spell, the game did not let me choose from my list but
> from the list of player 2. I attached a savegame.
Ok the last time I fixed Burstroem's Browser I wrote the right code but I
put it in the wrong place. This means that for the last 4 months the spell
has been letting people CHEAT and cast spells from other people's spell
lists! NOW FIXED.
November 5th, 2000:
* Added the 7 yes/no type strings to all the .catalog files.
SAI writes:
> Speaking of the info panels I've recently decided it would
> be nice to be able to see the life of a creature by simply
> placing the mouse over it.
How about at the bottom of the screen:
Wizard 1 (Sean) Life 19
NOW DONE.
November 6th, 2000:
* Sent v3.02 to FD and SAI for further playtesting.
Executable filesize = 370196
* Sent v3.02t (23) to SF for testing Hungarian font support, etc.
* The newsmedia is stupid. re: Election.
November 7th
* BUG: M key shows that I can attack undeads when really I can't.
NOW FIXED.
* FLAW: The scroll panel does not 100% handle spell descriptions that are
not all on 1 line. NOW FIXED.
* Added code WaitVBlank(2); to all the keypresses so that, for example,
when you are holding down the "s" key to see where you can shoot, the
flashing is more solid and pleasing to the eye.
* Made an archive backup of all English Spell Descriptions to
sc:SpellDescriptionsBackup.lha
* Ran FD's ReflowSpells.rexx script on the English spell descriptions.
It didn't flow them like I wanted. It went well beyond the defined
LineLength var. So I changed the script a bit and now it flows EXACTLY
like Cygnus Ed Professional does (Format/WithoutFill).
* Henceforth I will keep all spell descriptions with a max line length of
77 chars.
* Casting Brain Boost on a creature with max intelligence now raises its
intelligence recovery by 1 point.
* REWROTE Double and Triple spell descriptions to say that you cannot
double or triple any spell which grants multiple attempts.
* BUG: When 3 lines of text are displayed in the bottom text area of the
main screen, lines 2 and 3 overlap each other a bit. NOW FIXED.
FD Writes: ------------------------------------------------------------
> * I was asked a very strange question: "comrade nobody, would it be OK for
> you if I put this weak wall there next to your nothing ?" :-D ROFL !
NOW FIXED.
> * The answer to the question that was accepted was "y" and not "o" as is
> supposed to be in french mode.
NOW FIXED.
> * Something is wrong with the cloak graphics, I'm always mistakening it as
> "X-ray" ! I cloaked an enemy golem !
Well I programmed a really nifty gfx system so that you can redraw any
spell that you don't like.
Btw: hehehe its very funny that you cloaked an enemy golem. :)
Your AI must have some bugs in it. :)
END FD Writes ----------------------------------------------------------
* CHANGED Wood Elf to require 5 kills to promote to Dread Elf. After
extensive playtesting I have come to the conclusion that a Dread Elf
is just to powerful to be allowed after only 4 kills. It should be
changed to 5 or 6. Btw: it was _originally_ 5 kills when Sean first
implemented it so I'm just setting it back like it was.
While creating the new CellEffectList() function I noticed that the
algorythmic sound effects controlled by the menu option only apply to
independent creatures. Thus you can turn off the algorythmic sound effects
of the independents but not of computer controlled wizards. Should this be
changed?
* FLAW?: Turning off algorythmic sounds does not affect the sound of the
standard algorythmic "attack" sound. NOW FIXED.
Sunday November 12th:
I have gotten almost no work done since the election. Al Gore is trying to
steal our election from us! Using dastardly lawyer manuvers! This is very
upsetting and the political chaos is worsening every day :(
I can't concentrate on programming under such conditions. :(
* Problem: Special combat attacks take too long when there are many special
combat attackers on the board. I made a new CellEffectList function and
rewrote the SpecialCombatHandler so that all the special combat graphical
effects of a particular creature happen simultaneously for up to 8x speed
improvement. NOW FIXED.
* Robin and FD want your artifacts to go back to NOBODY when your wizard
dies (instead of having them fall asleep). NOW DONE.
* Problem: Computer-controlled flying creatures keep choosing to attack
earthquakes when they should really be attacking the nearby enemy
creatures. This is because earthquakes are set to have 15 combat for some
reason. I have now changed earthquakes to have 0 combat. Is this ok?
NOW FIXED.
* Added: FD's new EndTurnSelect.iff and QuestionMarkSelect.iff
* Edited / Antialiased QuestionMark.iff and QuestionMarkSelect.iff
* FD says Agents should be highlighted while casting spells. I looked
into this and there was already code to do this. However they weren't
highlighted until the instant that the spell was about to be cast. I have
now changed this so that the creature is highlighted immediately, before
any text is printed to the screen. Thus the creature will now be
highlighted for a longer period of time, without making anything take
longer and without slowing the game down any. Hopefully this will be
good enough. NOW DONE.
* ADDED Highlighting of real Generators because I like the Agent
highlighting so much.
Robin Writes:
> I found another flaw: When using the Move It spell you're suddenly able to
> move the Solar on your own account. That's not good my dear oh no...
Congratulations, you have discovered another game secret.
November 13th: I haven't heard from Xav in weeks. I was going to ask FD to
call him on the phone or drive to his house to see if he was still alive or
not. I was very worried about him. But today I _finally_ heard from him!
He was in the hospital with an appendicitis! He could have died! :(
* Random Bug: Sometimes when the game loads Mod.ChaosTheme1, infinite
enforcer hits are generated and all the fonts are destroyed.
November 14th, 2000:
* Assembled FD's new misca.asm for the music system to hopefully fix the
above bug.
In order to test the new music system bugfix I have decided to play a REAL
game of Chaos. I normally either,
A: Never play a game of Chaos.
B: Only play default games of me vs. 1 wizard and 4 generators. I usually
win these games in less than 24 turns.
Ok, so now I will try me vs. 1 cpu wizard and 99 generators, Texas
Trash'em, 99 spells. Both the cpu wizard and I died on turn 1
4 games in a row. I never started with cloak or lich so it was pretty
hopeless for me.
Now I am trying me + all 7 cpu wizards in an alliance against 99
generators, Texas Trash'em, 99 spells.
Turn 1:
I cast Weak Wall and blocked off a few generators. So did 2 or 3
of my Allies! We've already blocked a bunch of generators!
Turn 2:
I cast Lich on my Wizard. Now I can win!
* UNBELIEVABLY STUPID! All wizards are in an alliance against 99
generators. One of the computer wizards cast Coercion on turn 3! Now we
are all going to get killed because of this! NOW FIXED.
Well wec can't defend ourselves now, so a different wizard gets killed every
turn. I couldn't cast spells for 5 turns! By the time I could cast a
spell to help my allies the last one was dead! (He had been cloaked and
recover boosted.)
* FLAW: There is never an exophagy icon on my powerups list. NOW FIXED.
It is now turn 81 and I've never ever had a Recover Boost the entire game.
I did however get 2 Exophagy spells which I cast on my wizard and his
replicate. I've decided that Exophagy provides more strategy than Recover
Boost. Scavenging provides more strategy than Recover Boost also.
Well I haven't seen the random music bug in 81 turns so I guess its gone.
However this is not really a bonafide test because I usually play with
speech and sound fx on, but this time I have them turned off for speed.
Turn 83: I am turning the sound effects and speech back on.
Turn 92:
I killed 7 generators, a T-Rex and a Stone Golem on 1 turn and now I get to
pick any 9 spells out of a list of 30.
Then during my next turn, I attacked with my Ghost and the ghost sound got
stuck in an infinite loop! And it was generating infinite enforcer hits!
Ok so I opened up a shell and typed "who", it said that cli 9 was running
the ChaosDigitalSoundSubProcess so I typed "break 9 c" and it stopped the
enforcer hits and the sound. But now the game is in some sort of "not
accepting any input" mode so I can't do anything in the game. :(
During this game I was offered Dead Revenge on my Bonus Spell Selection
panel at least 10 times. I never picked it though. I had cast level
twice.
I theorize that JCsound has some sort of bug whereby if there is a CPU load
right at the moment of starting (or buffer switching) a sound sample then
there is a finite possibility that things can get hung up.
2nd theory: Something about the computerized speech or the algorythmic
sound effects routine is corrupting the audio.device.
Anyone who can solve this mystery automatically receives the
"Hero of the Month Award"
* FLAW: The score column is not positioned well on the score screen.
My score on turn 92 is 11602 thus placing it up against the Life value.
NOW FIXED.
* FLAW: Score screen score column is WAY out of position when playing in
Deutsch or Polski. NOW FIXED.
* BUG: Load any saved game and look at the score screen. The life totals
have not been freshly calculated so they are wrong. NOW FIXED.
On 14-Nov-00, Frederic Delacroix wrote:
> * Uncertainty suffers from the same flow as vanish did before you fixed it.
> If there are many corpses, it will almost never generate anything.
I changed this so that it can now generate onto empty squares or onto dead
bodies. NOW FIXED.
Note that if the board is mostly full of "stuff" (creatures, inanimates,
growths) then Uncertainity will probably not generate anything for you.
Its something to do with some law of physics that says you can't have 2
things in the same space at the same time. 8)
November 16th:
Sent v3.03 to FD and SAI for playtesting. Executable filesize is 371880
bytes.
END OF VERSION 3.03
* EDITED Magic Carpet and Chainsaw graphics a bit.
* PROBLEM: I hate the animation of the Bolter. So I just now changed it to
something else. It is now somewhat better than before, but still not
very good. Someone needs to fix this up.
FD Writes:
> * A wizard just cast poison dagger on its own bolter. Considering that a
> bolter can never attack, this is kinda stupid.
NOW FIXED.
> * When dismounting, the "M" key shows a lot of places where I cannot move (I
> have wizard wings+speed but I can only move one square in this situation).
NOW FIXED.
* Aaaaaaugh! Reveal was set to only be a ranking of 4! This is why
computer wizards never cast it on anyone! I am now raising it to 44 so
that, basically, if they _can_ cast it on an enemy then they will.
* Sean and Frédéric both hate the green square for cloaked creatures. This
same green square is also used to draw unexplored squares. Also FD has
complained that the Cloak graphic is easily confused with the X-Ray
graphic. So I have now drawn a new Cloak graphic which is used for 3
things:
1. As the graphic for the Cloak spell.
2. As the graphic for a cloaked creature.
3. As the graphic for an unexplored square.
If you do not like this graphic then you are free to draw a better one
and it will automagically appear in the game.
* CHANGED Earthquakes back to 15 combat and adjusted the
DangerousnessRating() routine to ignore combat, ranged combat, etc.
when rating an inanimate object. I did this so that a person could cast
theoretically cast No Grow then Stone to Flesh on an Earthquake and have
a powerful max combat creature. I realize this will hardly ever happen.
But it only needs to happen once for it to be all worthwhile.
END OF VERSION v3.04